Buf fix: Check for empty before resuming n_string2
This commit is contained in:
@@ -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:
|
||||||
|
|||||||
Reference in New Issue
Block a user