aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bas.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/bas.c b/bas.c
index 8b62837..efb985e 100644
--- a/bas.c
+++ b/bas.c
@@ -306,6 +306,8 @@ void walk_code(unsigned int startlineno, unsigned int endlineno) {
continue;
}
+ if(lineno > endlineno) break;
+
CALL(on_start_line);
pos = linepos + 3;
@@ -362,7 +364,7 @@ void walk_code(unsigned int startlineno, unsigned int endlineno) {
CALL(on_end_line);
linepos = nextpos;
- if(lineno >= endlineno) break;
+ if(lineno == 32768) break;
}
if(endlineno == 32768 && linepos < filelen) {