pinosaur
/
smdp.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7eb09d7
)
Use is_utf8() instead, for more readable.
author
FreeBirdLjj
<ljj11011@mail.ustc.edu.cn>
Wed, 24 Sep 2014 17:05:56 +0000
(
01:05
+0800)
committer
FreeBirdLjj
<ljj11011@mail.ustc.edu.cn>
Wed, 24 Sep 2014 17:05:56 +0000
(
01:05
+0800)
src/parser.c
patch
|
blob
|
history
diff --git
a/src/parser.c
b/src/parser.c
index
6f5c4c8
..
478da5b
100644
(file)
--- 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;
}