# HG changeset patch # User Sadrul Habib Chowdhury # Date 1156330101 0 # Node ID 578a2c9af05e70a15832c193a0cdc7fc13c58bd9 # Parent 9ad313800b194ca737e9e7ff915011f79f582788 [gaim-migrate @ 16999] guard against possible crashes. committer: Tailor Script diff -r 9ad313800b19 -r 578a2c9af05e console/libgnt/gntentry.c --- 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++; }