]> thyrsus.com Git - cupl.git/commitdiff
Safer traversal.
authorEric S. Raymond <esr@thyrsus.com>
Fri, 11 Nov 1994 20:50:03 +0000 (20:50 +0000)
committerEric S. Raymond <esr@thyrsus.com>
Fri, 11 Nov 1994 20:50:03 +0000 (20:50 +0000)
interpret.c

index a7a7d5b5e2b59e564d7d66ed31c167086ad309be..1f24213b5611f74a47c29970c2cf58631324d8e8 100644 (file)
@@ -93,6 +93,9 @@ static bool recursive_apply(node *tree, bool (*fun)(node *))
 static bool r_mark_labels(node *tp)
 /* record label references */
 {
+    if (ATOMIC(tp->type))
+       return(TRUE);
+
     /* count label definitions */
     if (tp->type == LABEL)
        if (tp->cdr->type == BLOCK)
@@ -249,6 +252,9 @@ static bool check_errors(node *tree)
 static bool r_label_rewrite(node *tp)
 /* resolve label references */
 {
+    if (ATOMIC(tp->type))
+       return(TRUE);
+
     /*
      * KISS -- this code may do extra work, but it needs no special
      * knowledge about node types.