fix cparse.c gc bug

This commit is contained in:
CPunch 2023-08-29 23:01:47 -05:00
parent 1408a07b23
commit 6ed5589513

View File

@ -481,6 +481,7 @@ static void string(CParseState *pstate, bool canAssign, Precedence prec)
{ {
CObjString *strObj = CObjString *strObj =
cosmoO_takeString(pstate->state, pstate->previous.start, pstate->previous.length); cosmoO_takeString(pstate->state, pstate->previous.start, pstate->previous.length);
keepTrackOf(pstate, cosmoV_newRef((CObj *)strObj));
writeConstant(pstate, cosmoV_newRef((CObj *)strObj)); writeConstant(pstate, cosmoV_newRef((CObj *)strObj));
} }