changeset 16044:ca463cecd432

Only ascii keys can be bound, fixes a crash when inputting non-ascii chars
author Richard Nelson <wabz@pidgin.im>
date Tue, 10 Apr 2007 09:32:52 +0000
parents ef727f4b9aac
children 1d1f8edc5f5f
files finch/libgnt/gntkeys.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/finch/libgnt/gntkeys.c	Tue Apr 10 07:25:26 2007 +0000
+++ b/finch/libgnt/gntkeys.c	Tue Apr 10 09:32:52 2007 +0000
@@ -230,7 +230,9 @@
 
 	root.flags &= ~IS_END;
 	while (*path && n->next[*path] && !(n->flags & IS_END)) {
-		if (g_utf8_find_next_char(path, NULL) - path > 1)
+		if (!g_ascii_isspace(*path) &&
+				!g_ascii_iscntrl(*path) &&
+				!g_ascii_isgraph(*path))
 			return 0;
 		n = n->next[*path++];
 		depth++;