From: ntakahas Date: Mon, 15 Jun 2009 11:48:35 +0000 (+0000) Subject: *** empty log message *** X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3dca5a0928520fdd47c32643c8485f730ed7a34d;p=m17n%2Fm17n-lib-cs.git *** empty log message *** --- diff --git a/frontsensitive.cs b/frontsensitive.cs index 84e12e8..c990ec0 100644 --- a/frontsensitive.cs +++ b/frontsensitive.cs @@ -98,18 +98,27 @@ public class Test // delete for (i = to; i < LENGTH; i++) valtable[i - l] = valtable[i]; - for (i = LENGTH - l; i < LENGTH; i++) - valtable[i] = null; + valtable[LENGTH - l] = null; // sensitivity for insertion - if (from2 > 0 && valtable[from2] != null) + if (from2 > 0) { - 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 (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; + } } + // move for (i = LENGTH - 1; i >= from2 + l; i--)