Buf fix: Check for empty before resuming n_string2

This commit is contained in:
2025-06-24 12:43:01 -04:00
parent 5e3fa62a06
commit dfce1ae412

View File

@@ -555,6 +555,10 @@ inline PRESERVE_NONE WeaselJsonStatus n_string2(Parser3 *self, char *buf,
} }
*self->writeBuf++ = unescaped; *self->writeBuf++ = unescaped;
} }
if (buf == bufEnd) {
self->flushString(false);
return WeaselJson_AGAIN;
}
MUSTTAIL return n_string2(self, buf, bufEnd); MUSTTAIL return n_string2(self, buf, bufEnd);
} }
default: default: