fix cparse.c gc bug

This commit is contained in:
CPunch 2023-08-29 23:01:47 -05:00 committed by cpunch
parent 9f19fd4f31
commit d41126e75f
1 changed files with 1 additions and 0 deletions

View File

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