indexing error in basic

This commit is contained in:
Denis Molony 2020-12-15 19:18:56 +10:00
parent 75a43ee2e2
commit de59d9ae29

View File

@ -554,7 +554,7 @@ public class ApplesoftBasicProgram extends BasicProgram
boolean inRemark = false; // can only go false -> true
byte b;
while ((b = buffer[ptr++]) != 0)
while (ptr < buffer.length && (b = buffer[ptr++]) != 0)
{
if (inRemark) // cannot terminate a REM
continue;