diff options
-rw-r--r-- | bas.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -207,8 +207,9 @@ int vntable_ok(void) { while(vp < vvstart) { unsigned char c = program[vp]; - /* treat a null byte as end-of-table, ignore any junk between it and VNTP. */ - if(c == 0) break; + /* allow for (but don't require) dummy byte at VNTD. used to just + quit when we hit 0, but 0 might be part of a scrambled table. */ + if(c == 0 && vp == (vvstart - 1)) break; vp++; |