changeset 28153: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 237cb598a025
children 6e4b8c6460d0 7f447db0e03b
files libpurple/util.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
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;
 		}
 	}