From f71ba14f6a92aa6ebf7accd9d66020912c09d1dd Mon Sep 17 00:00:00 2001 From: krangelov Date: Tue, 7 Dec 2021 15:51:05 +0100 Subject: [PATCH] fix bracketed linearization for literals --- src/runtime/c/pgf/linearizer.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/runtime/c/pgf/linearizer.cxx b/src/runtime/c/pgf/linearizer.cxx index 2721edd17..ea425c58f 100644 --- a/src/runtime/c/pgf/linearizer.cxx +++ b/src/runtime/c/pgf/linearizer.cxx @@ -225,6 +225,8 @@ void PgfLinearizer::BracketStack::flush(PgfLinearizationOutputIface *out) void PgfLinearizer::linearize(PgfLinearizationOutputIface *out, TreeNode *node, size_t d, PgfLParam *r) { + size_t lindex = node->eval_param(r); + PgfText *cat = &vector_elem(node->lin->absfun->type->hypos, d)->type->name; TreeNode *arg = node->args; while (d > 0) { arg = arg->next_arg; @@ -232,8 +234,6 @@ void PgfLinearizer::linearize(PgfLinearizationOutputIface *out, TreeNode *node, throw pgf_error("Found inconsistency in the PMCFG representation"); d--; } - size_t lindex = node->eval_param(r); - PgfText *cat = &arg->lin->absfun->type->name; PgfText *field = NULL; ref lincat = namespace_lookup(concr->lincats, cat);