summaryrefslogtreecommitdiff
path: root/src/fe-text/utf8.c
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2002-02-15 14:09:10 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2002-02-15 14:09:10 +0000
commitd0a9710bb82bdf068abfcb48d7f4c790178ec15e (patch)
tree0f9b78d2cd3dd95ce56b6f2b81201ae3e6e16140 /src/fe-text/utf8.c
parent0f39c504d14af76afffc5c6e6e0193a1d4a749e9 (diff)
downloadirssi-d0a9710bb82bdf068abfcb48d7f4c790178ec15e.zip
get_utf8_char() was buggy
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@2450 dbcabf3a-b0e7-0310-adc4-f8d773084564
Diffstat (limited to 'src/fe-text/utf8.c')
-rw-r--r--src/fe-text/utf8.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/fe-text/utf8.c b/src/fe-text/utf8.c
index e58307d2..8a2f2a8b 100644
--- a/src/fe-text/utf8.c
+++ b/src/fe-text/utf8.c
@@ -78,17 +78,17 @@ unichar get_utf8_char(const unsigned char **ptr, int len)
mask = 0;
UTF8_COMPUTE(**ptr, mask, chrlen);
- if (len == -1)
+ if (chrlen == -1)
return (unichar) -2;
if (chrlen > len)
return (unichar) -1;
- UTF8_GET(result, *ptr, i, mask, len);
+ UTF8_GET(result, *ptr, i, mask, chrlen);
if (result == -1)
return (unichar) -2;
- *ptr += len-1;
+ *ptr += chrlen-1;
return result;
}