prim_match: Use state.vNull

This commit is contained in:
Robert Hensing 2024-03-20 21:28:38 +01:00
parent 3e6730ee62
commit 0b08dd45b0

View file

@ -4004,7 +4004,7 @@ void prim_match(EvalState & state, const PosIdx pos, Value * * args, Value & v)
auto list = state.buildList(match.size() - 1);
for (const auto & [i, v2] : enumerate(list))
if (!match[i + 1].matched)
(v2 = state.allocValue())->mkNull();
v2 = &state.vNull;
else
(v2 = state.allocValue())->mkString(match[i + 1].str());
v.mkList(list);