From a64de8af30f7a0465333e65f365dfa02ad2862b6 Mon Sep 17 00:00:00 2001 From: FreeBirdLjj Date: Thu, 25 Sep 2014 01:05:56 +0800 Subject: [PATCH] Use is_utf8() instead, for more readable. --- src/parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parser.c b/src/parser.c index 6f5c4c8..478da5b 100644 --- a/src/parser.c +++ b/src/parser.c @@ -382,7 +382,7 @@ int length_utf8(char ch) { int i = 0; // increment - while(ch & 0x80) { + while(is_utf8(ch)) { i++; ch <<= 1; } -- 2.20.1