String buffers, part 2d: basic string buffer methods.

Sponsored by fmad.io.
This commit is contained in:
Mike Pall
2021-06-01 05:16:32 +02:00
parent edd5cbadc5
commit a119497bec
18 changed files with 816 additions and 85 deletions

View File

@@ -346,10 +346,7 @@ SBufExt * LJ_FASTCALL lj_serialize_put(SBufExt *sbx, cTValue *o)
SBufExt * LJ_FASTCALL lj_serialize_get(SBufExt *sbx, TValue *o)
{
char *r = serialize_get(sbx->r, sbx, o);
if (r != sbx->w)
lj_err_caller(sbufL(sbx), LJ_ERR_BUFFER_LEFTOV);
sbx->r = r;
sbx->r = serialize_get(sbx->r, sbx, o);
return sbx;
}