summaryrefslogtreecommitdiff
path: root/gtk/gtkimcontextsimple.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2004-10-26 20:56:52 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2004-10-26 20:56:52 +0000
commite645924c80894d8d0381692db7e02cb4984291ab (patch)
tree899f8456fc819d6db4059265adc79529d0187be8 /gtk/gtkimcontextsimple.c
parentd81632108cd98d9a952bc5546043bf2f5e6a6bd5 (diff)
downloadgtk+-e645924c80894d8d0381692db7e02cb4984291ab.tar.gz
Stop preediting if strtoul couldn't parse the complete preedit string.
2004-10-26 Matthias Clasen <mclasen@redhat.com> * gtk/gtkimcontextsimple.c (check_hex): Stop preediting if strtoul couldn't parse the complete preedit string. (#156434)
Diffstat (limited to 'gtk/gtkimcontextsimple.c')
-rw-r--r--gtk/gtkimcontextsimple.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gtk/gtkimcontextsimple.c b/gtk/gtkimcontextsimple.c
index 40f8ac2826..00809ec90a 100644
--- a/gtk/gtkimcontextsimple.c
+++ b/gtk/gtkimcontextsimple.c
@@ -1167,7 +1167,7 @@ check_hex (GtkIMContextSimple *context_simple,
/* if strtoul fails it probably means non-latin digits were used;
* we should in principle handle that, but we probably don't.
*/
- if (str->str == nptr)
+ if (nptr - str->str < str->len)
{
g_string_free (str, TRUE);
return FALSE;