When at end of file (nextAddress is 0), set the offset to the end

of file.
This commit is contained in:
Robert Greene 2003-06-03 05:53:19 +00:00
parent e73e9c0f2d
commit 895685e948

View File

@ -94,6 +94,8 @@ public class ApplesoftTokenizer {
nextAddress = AppleUtil.getWordValue(fileData, offset);
offset+= 2;
if (nextAddress == 0) {
// At end of file, ensure we don't try to continue processing...
offset = fileData.length;
return null;
}
int lineNumber = AppleUtil.getWordValue(fileData, offset);