From: <sa...@us...> - 2006-10-12 03:33:14
|
Revision: 17468 http://svn.sourceforge.net/gaim/?rev=17468&view=rev Author: sadrul Date: 2006-10-11 20:33:07 -0700 (Wed, 11 Oct 2006) Log Message: ----------- Make sure things don't go crazy when you add text to a textview which is yet to be given a size. Modified Paths: -------------- trunk/console/libgnt/gntutils.c Modified: trunk/console/libgnt/gntutils.c =================================================================== --- trunk/console/libgnt/gntutils.c 2006-10-12 03:30:25 UTC (rev 17467) +++ trunk/console/libgnt/gntutils.c 2006-10-12 03:33:07 UTC (rev 17468) @@ -59,6 +59,10 @@ int width = 0; const char *str = string; + if (len <= 0) { + len = g_utf8_strlen(string, -1); + } + while (width < len && *str) { size = g_unichar_iswide(g_utf8_get_char(str)) ? 2 : 1; if (width + size > len) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |