From 2d1a1d084ba7b178e57790a1825adff0d2aa1775 Mon Sep 17 00:00:00 2001 From: ntakahas Date: Mon, 15 Jun 2009 11:59:30 +0000 Subject: [PATCH] *** empty log message *** --- frontsensitive.cs | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/frontsensitive.cs b/frontsensitive.cs index c990ec0..fda06e3 100644 --- a/frontsensitive.cs +++ b/frontsensitive.cs @@ -101,25 +101,21 @@ public class Test valtable[LENGTH - l] = null; // sensitivity for insertion - if (from2 > 0) + if (valtable[from2] != null) { - if (valtable[from2] != null) - { - sym = valtable[from2]; - for (i = from2 - 1; i >= 0 && valtable[i] == sym; i--) - valtable[i] = null; - for (i = from2; i < LENGTH && valtable[i] == sym; i++) - valtable[i] = null; - } - if (valtable2[0] != null) - { - sym = valtable2[0]; - for (i = 0; i < LENGTH && valtable2[i] == sym; i++) - valtable2[i] = null; - } + sym = valtable[from2]; + for (i = from2 - 1; i >= 0 && valtable[i] == sym; i--) + valtable[i] = null; + for (i = from2; i < LENGTH && valtable[i] == sym; i++) + valtable[i] = null; + } + if ((from > 0 || from2 > 0) && valtable2[0] != null) + { + sym = valtable2[0]; + for (i = 0; i < LENGTH && valtable2[i] == sym; i++) + valtable2[i] = null; } - // move for (i = LENGTH - 1; i >= from2 + l; i--) valtable[i] = valtable[i - l]; -- 1.7.10.4