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)
This commit is contained in:
Matthias Clasen 2004-10-26 20:56:52 +00:00 committed by Matthias Clasen
parent d81632108c
commit e645924c80
5 changed files with 13 additions and 1 deletions

View File

@ -1,5 +1,8 @@
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)
* gtk/gtkmessagedialog.c:
* gtk/gtkfilechooserbutton.c: Add missing includes. (#156503, Kazuki IWAMOTO)

View File

@ -1,5 +1,8 @@
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)
* gtk/gtkmessagedialog.c:
* gtk/gtkfilechooserbutton.c: Add missing includes. (#156503, Kazuki IWAMOTO)

View File

@ -1,5 +1,8 @@
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)
* gtk/gtkmessagedialog.c:
* gtk/gtkfilechooserbutton.c: Add missing includes. (#156503, Kazuki IWAMOTO)

View File

@ -1,5 +1,8 @@
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)
* gtk/gtkmessagedialog.c:
* gtk/gtkfilechooserbutton.c: Add missing includes. (#156503, Kazuki IWAMOTO)

View File

@ -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;