From 8d4186130d6078c04f7b6bf0a399eb21fa76c7f1 Mon Sep 17 00:00:00 2001 From: David Given Date: Tue, 4 Oct 2016 21:32:28 +0200 Subject: [PATCH] Oops --- hadn't updated the nts array for the new child order. --- util/mcgg/iburg.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/util/mcgg/iburg.c b/util/mcgg/iburg.c index af3106a8c..3eb703bcf 100644 --- a/util/mcgg/iburg.c +++ b/util/mcgg/iburg.c @@ -779,9 +779,12 @@ static char* computents(Tree t, char* bp) if (t) { Nonterm p = t->op; - if (p->kind == NONTERM) + if (!t->left && !t->right) { - sprintf(bp, "%s_%s_NT, ", prefix, p->name); + if (p->kind == NONTERM) + sprintf(bp, "%s_%s_NT, ", prefix, p->name); + else + sprintf(bp, "0, "); bp += strlen(bp); } else