changeset 14309:578a2c9af05e

[gaim-migrate @ 16999] guard against possible crashes. committer: Tailor Script <tailor@pidgin.im>
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Wed, 23 Aug 2006 10:48:21 +0000
parents 9ad313800b19
children a766441af5ea
files console/libgnt/gntentry.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/console/libgnt/gntentry.c	Wed Aug 23 08:02:05 2006 +0000
+++ b/console/libgnt/gntentry.c	Wed Aug 23 10:48:21 2006 +0000
@@ -19,7 +19,7 @@
 get_onscreen_width(const char *start, const char *end)
 {
 	wchar_t wch;
-	size_t size;
+	int size;
 	int width = 0;
 
 	while (start < end) {
@@ -351,7 +351,7 @@
 			{
 				char *s = get_beginning_of_word(entry);
 				char *iter = text;
-				while (toupper(*s) == toupper(*iter))
+				while (*iter && toupper(*s) == toupper(*iter))
 				{
 					*s++ = *iter++;
 				}