diff options
-rw-r--r-- | bas.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -343,6 +343,10 @@ void walk_code(unsigned int startlineno, unsigned int endlineno) { pos = linepos + 3; while(pos < nextpos) { /* loop over statements within a line */ soffset = program[pos]; + if(!soffset) { + fprintf(stderr, "Fatal: next-statement offset is 0 at line %d, pos %04x\n", lineno, pos); + exit(1); + } end = linepos + soffset; CALL(on_start_stmt); |