aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libparser-generate.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libparser-generate.c b/libparser-generate.c
index cc03972..ef2177c 100644
--- a/libparser-generate.c
+++ b/libparser-generate.c
@@ -138,7 +138,7 @@ check_utf8(char *buf, size_t *ip, size_t len)
cp |= (uint32_t)(unsigned char)(buf[*ip + i] ^ 0x80);
}
*ip += req;
- if ((cp & UINT32_C(0xD8000)) == UINT32_C(0xD8000))
+ if ((cp & UINT32_C(0xFFF8000)) == UINT32_C(0xD8000))
return 0;
if (cp < (uint32_t)1 << (7 + 0 * 6))
return 0;