diff console/libgnt/gntutils.c @ 14477:ca36763497d9

[gaim-migrate @ 17195] Build libgnt with ncurses if ncursesw is not found. I uninstalled ncursesw and it's still working for me .. of course, with no wide-character support. Improve the mouse support a bit. committer: Tailor Script <tailor@pidgin.im>
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Sat, 09 Sep 2006 02:19:16 +0000
parents c374f45f4c94
children 1d084d1ee6fa
line wrap: on
line diff
--- a/console/libgnt/gntutils.c	Fri Sep 08 22:47:36 2006 +0000
+++ b/console/libgnt/gntutils.c	Sat Sep 09 02:19:16 2006 +0000
@@ -43,6 +43,9 @@
 {
 	int width = 0;
 
+	if (end == NULL)
+		end = start + strlen(start);
+
 	while (start < end) {
 		width += g_unichar_iswide(g_utf8_get_char(start)) ? 2 : 1;
 		start = g_utf8_next_char(start);