From 6f32525a6a35c3fc7588e0e21240c32cce79ee08 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Fri, 11 Nov 1994 20:50:03 +0000 Subject: [PATCH] Safer traversal. --- interpret.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/interpret.c b/interpret.c index a7a7d5b..1f24213 100644 --- a/interpret.c +++ b/interpret.c @@ -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. -- 2.43.0