Fix issue with memory allocations in lisp::serialise
Was to do with sv_make.
This commit is contained in:
@@ -252,7 +252,13 @@ sv_t serialise(context_t *ctx, lisp_t *ptr)
|
||||
lmember = CAR(lmember);
|
||||
|
||||
sv_t member = serialise(ctx, lmember);
|
||||
s = sv_concat(&ctx->scratch, s, member);
|
||||
if (!s.data)
|
||||
s = member;
|
||||
else
|
||||
s = sv_concat(&ctx->scratch, s, member);
|
||||
|
||||
// NOTE: eventually this separator we add per item should be mutable at
|
||||
// runtime.
|
||||
if (IS_TAG(lsp, CONS) && !CDR(lsp))
|
||||
continue;
|
||||
else if (IS_TAG(CDR(lsp), CONS))
|
||||
|
||||
Reference in New Issue
Block a user