aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2020-06-10 08:30:29 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2020-06-10 08:30:29 +0200
commit2ee88b6041557beb517b100c3f608ebfc5eb725d (patch)
treeca3a4dceee88ee08814d0f57c38a278caf8200c7
parentc78f03ca550bfdcec1de4e2fd96a2604476374d7 (diff)
Fix bug in subscript of NULL values
-rw-r--r--libbuild2/parser.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/libbuild2/parser.cxx b/libbuild2/parser.cxx
index e6a1c6a..db00633 100644
--- a/libbuild2/parser.cxx
+++ b/libbuild2/parser.cxx
@@ -6016,7 +6016,9 @@ namespace build2
//
// Note that result may or may not point to result_data.
//
- if (result->type == nullptr)
+ if (result->null)
+ result_data = value ();
+ else if (result->type == nullptr)
{
const names& ns (result->as<names> ());