From 0b08dd45b03afd5161966893e42080bf130f527c Mon Sep 17 00:00:00 2001 From: Robert Hensing Date: Wed, 20 Mar 2024 21:28:38 +0100 Subject: [PATCH] prim_match: Use state.vNull --- src/libexpr/primops.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc index 9449a8f7c..2cb78e35f 100644 --- a/src/libexpr/primops.cc +++ b/src/libexpr/primops.cc @@ -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);