X-Git-Url: https://git.danieliu.xyz/?a=blobdiff_plain;f=src%2Fparser.c;h=478da5b3c22bf868a9feda245500f33b99c104f2;hb=a64de8af30f7a0465333e65f365dfa02ad2862b6;hp=6f5c4c8de904003b58e21c46e820dc5ce9ae6076;hpb=7eb09d7e88eec3c6531d2837376369af06acb8cb;p=smdp.git 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; }