From: handa Date: Tue, 20 Oct 2009 11:37:52 +0000 (+0000) Subject: *** empty log message *** X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=8d1ff42f86e84324d8b3fab8a49f493dc1410dc0;p=m17n%2Fm17n-lib-cs.git *** empty log message *** --- diff --git a/MInputMethod.cs b/MInputMethod.cs index da10788..a0a1e76 100644 --- a/MInputMethod.cs +++ b/MInputMethod.cs @@ -559,7 +559,10 @@ namespace M17N.Input } public virtual int CharAt (Context ic) { - return ic.preedit[Position (ic)]; + int pos = Position (ic); + + return ((pos >= 0 && pos < ic.preedit.Length) ? ic.preedit[pos] + : -1); } public override string ToString ()