xml.c: fix typo in checking surrogate range - xmlparser - XML parser
(HTM) git clone git://git.codemadness.org/xmlparser
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit f84ddc4941d473eccd2509921dfb5055e108e96e
(DIR) parent 2e33c882b88eebdaefb0477658a9cbb79d57e2b1
(HTM) Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Fri, 22 Jan 2021 22:51:21 +0100
xml.c: fix typo in checking surrogate range
Diffstat:
M xml.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
(DIR) diff --git a/xml.c b/xml.c
@@ -288,7 +288,7 @@ numericentitytostr(const char *e, char *buf, size_t bufsiz)
l = strtol(e, &end, 10);
/* invalid value or not a well-formed entity or invalid code point */
if (errno || e == end || *end != ';' || l < 0 || l > 0x10ffff ||
- (l >= 0xd800 && l <= 0xdffff))
+ (l >= 0xd800 && l <= 0xdfff))
return -1;
len = codepointtoutf8(l, buf);
buf[len] = '\0';