Fix bogus assert

This commit is contained in:
2025-05-19 16:21:05 -04:00
parent 2b604a4f89
commit ff00f3eead

View File

@@ -644,7 +644,7 @@ inline Status t_hex3(Parser3 *self) {
// Write codepoint in utf-8 if there's room in the user provided buffer. If // Write codepoint in utf-8 if there's room in the user provided buffer. If
// there's not room, flush, write into a temp buffer, and flush again. // there's not room, flush, write into a temp buffer, and flush again.
char tmp[4]; char tmp[4];
assert(self->utf8Codepoint < 0x10000); assert(self->utf8Codepoint >= 0x10000);
if (self->utf8Codepoint > 0x10FFFF) { if (self->utf8Codepoint > 0x10FFFF) {
return S_REJECT; return S_REJECT;
} }