xml.c: fix typo in checking surrogate range - xmlparser - XML parser | |
git clone git://git.codemadness.org/xmlparser | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit f84ddc4941d473eccd2509921dfb5055e108e96e | |
parent 2e33c882b88eebdaefb0477658a9cbb79d57e2b1 | |
Author: Hiltjo Posthuma <[email protected]> | |
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(-) | |
--- | |
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'; |