shithub: mc

Download patch

ref: b7ad8cdab0be770c844a9e1054c4d7f63773abdf
parent: bbe13f1e7ffe514c75c849a4b1a32815fd610ef3
author: Ori Bernstein <[email protected]>
date: Sun Jun 17 18:48:14 EDT 2012

Make it more obvious when we fail to init 'did'

    Set the default value to -1 so that we error, instead
    of just returning the id of the first declaration we made.

--- a/parse/node.c
+++ b/parse/node.c
@@ -53,6 +53,7 @@
 
     n = mknode(line, Nexpr);
     n->expr.op = op;
+    n->expr.did = -1;
     va_start(ap, op);
     while ((arg = va_arg(ap, Node*)) != NULL)
         lappend(&n->expr.args, &n->expr.nargs, arg);