From e645924c80894d8d0381692db7e02cb4984291ab Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 26 Oct 2004 20:56:52 +0000 Subject: [PATCH] Stop preediting if strtoul couldn't parse the complete preedit string. 2004-10-26 Matthias Clasen * gtk/gtkimcontextsimple.c (check_hex): Stop preediting if strtoul couldn't parse the complete preedit string. (#156434) --- ChangeLog | 3 +++ ChangeLog.pre-2-10 | 3 +++ ChangeLog.pre-2-6 | 3 +++ ChangeLog.pre-2-8 | 3 +++ gtk/gtkimcontextsimple.c | 2 +- 5 files changed, 13 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 0fa4153a00..c0e5eb0d7a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2004-10-26 Matthias Clasen + * gtk/gtkimcontextsimple.c (check_hex): Stop preediting if strtoul couldn't + parse the complete preedit string. (#156434) + * gtk/gtkmessagedialog.c: * gtk/gtkfilechooserbutton.c: Add missing includes. (#156503, Kazuki IWAMOTO) diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 0fa4153a00..c0e5eb0d7a 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,5 +1,8 @@ 2004-10-26 Matthias Clasen + * gtk/gtkimcontextsimple.c (check_hex): Stop preediting if strtoul couldn't + parse the complete preedit string. (#156434) + * gtk/gtkmessagedialog.c: * gtk/gtkfilechooserbutton.c: Add missing includes. (#156503, Kazuki IWAMOTO) diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 0fa4153a00..c0e5eb0d7a 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,5 +1,8 @@ 2004-10-26 Matthias Clasen + * gtk/gtkimcontextsimple.c (check_hex): Stop preediting if strtoul couldn't + parse the complete preedit string. (#156434) + * gtk/gtkmessagedialog.c: * gtk/gtkfilechooserbutton.c: Add missing includes. (#156503, Kazuki IWAMOTO) diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 0fa4153a00..c0e5eb0d7a 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,5 +1,8 @@ 2004-10-26 Matthias Clasen + * gtk/gtkimcontextsimple.c (check_hex): Stop preediting if strtoul couldn't + parse the complete preedit string. (#156434) + * gtk/gtkmessagedialog.c: * gtk/gtkfilechooserbutton.c: Add missing includes. (#156503, Kazuki IWAMOTO) 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;