Fix string scan bug
This commit is contained in:
@@ -788,7 +788,8 @@ inline PRESERVE_NONE WeaselJsonStatus scan_string_impl(Parser3 *self,
|
|||||||
char *bufEnd) {
|
char *bufEnd) {
|
||||||
const auto before = buf;
|
const auto before = buf;
|
||||||
|
|
||||||
// Advance buf past normal characters
|
// Advance buf past characters that transition the accept state to itself
|
||||||
|
if (self->strDfa.accept()) {
|
||||||
for (;;) {
|
for (;;) {
|
||||||
if (bufEnd - buf < V::lanes) [[unlikely]] {
|
if (bufEnd - buf < V::lanes) [[unlikely]] {
|
||||||
break;
|
break;
|
||||||
@@ -802,6 +803,7 @@ inline PRESERVE_NONE WeaselJsonStatus scan_string_impl(Parser3 *self,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
buf = (char *)self->strDfa.scan(buf, bufEnd);
|
buf = (char *)self->strDfa.scan(buf, bufEnd);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user