First check in

This commit is contained in:
2016-09-09 14:03:25 -05:00
commit 83b8032bf3
8 changed files with 139 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
diff -purN a/bc/execute.c b/bc/execute.c
--- a/bc/execute.c 2006-09-04 21:39:31.000000000 -0500
+++ b/bc/execute.c 2016-09-09 12:57:14.756000000 -0500
@@ -133,7 +133,11 @@ execute ()
gp = functions[pc.pc_func].f_label;
l_gp = label_num >> BC_LABEL_LOG;
l_off = label_num % BC_LABEL_GROUP;
- while (l_gp-- > 0) gp = gp->l_next;
+ while (gp && l_gp-- > 0) gp = gp->l_next;
+ if (!gp) {
+ rt_error ("No label group for label %d.", label_num);
+ break;
+ }
pc.pc_addr = gp->l_adrs[l_off];
}
break;