summaryrefslogtreecommitdiffstatshomepage
path: root/py/unicode.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2018-11-26 16:13:08 +1100
committerDamien George <damien.p.george@gmail.com>2018-11-26 16:13:08 +1100
commit7c85c7c210e3ad417f59038de95b71618783d76c (patch)
tree133d8e4c446a3f854213d547cfaad38af0eed36d /py/unicode.c
parentd63ef86c6e83205f18938bfa8e538e35eda5fd52 (diff)
downloadmicropython-7c85c7c210e3ad417f59038de95b71618783d76c.tar.gz
micropython-7c85c7c210e3ad417f59038de95b71618783d76c.zip
py/unicode: Fix check for valid utf8 being stricter about contn chars.
Diffstat (limited to 'py/unicode.c')
-rw-r--r--py/unicode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/py/unicode.c b/py/unicode.c
index 935dc9012e..d69b6f56f0 100644
--- a/py/unicode.c
+++ b/py/unicode.c
@@ -180,7 +180,7 @@ bool utf8_check(const byte *p, size_t len) {
for (; p < end; p++) {
byte c = *p;
if (need) {
- if (c >= 0x80) {
+ if (UTF8_IS_CONT(c)) {
need--;
} else {
// mismatch