From 8d1ff42f86e84324d8b3fab8a49f493dc1410dc0 Mon Sep 17 00:00:00 2001 From: handa Date: Tue, 20 Oct 2009 11:37:52 +0000 Subject: [PATCH] *** empty log message *** --- MInputMethod.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 () -- 1.7.10.4