Mercurial > pidgin.yaz
diff libpurple/util.c @ 28509:10c28fac798d
gah, signed comparison meant this was stripping all multibyte UTF-8 characters.
Thanks a bunch to SuperMMX for pointing this out.
author | Paul Aurich <paul@darkrain42.org> |
---|---|
date | Mon, 31 Aug 2009 08:00:06 +0000 |
parents | 5901b1dd8d07 |
children | 612f6d000a2a 79c14adf9669 |
line wrap: on
line diff
--- a/libpurple/util.c Mon Aug 31 03:47:40 2009 +0000 +++ b/libpurple/util.c Mon Aug 31 08:00:06 2009 +0000 @@ -4670,8 +4670,9 @@ workstr = iter = g_new(gchar, strlen(str) + 1); for ( ; *str; ++str) { - if (*str >= 0x20 || *str == '\t' || *str == '\n' || *str == '\r') { - *iter = *str; + guchar c = *str; + if (c >= 0x20 || c == '\t' || c == '\n' || c == '\r') { + *iter = c; ++iter; } }