allow empty DATA

This commit is contained in:
Denis Molony 2021-01-15 08:19:34 +10:00
parent 301b6c27c4
commit ca64401dde

View File

@ -335,8 +335,11 @@ public class SubLine implements ApplesoftConstants
break; break;
case TOKEN_DATA: case TOKEN_DATA:
String[] chunks = new String (getBuffer ()).split (","); lineBuffer = getBuffer ();
for (String chunk : chunks) if (lineBuffer.length == 0)
break;
for (String chunk : new String (lineBuffer).split (","))
{ {
b = (byte) chunk.charAt (0); b = (byte) chunk.charAt (0);
if (Utility.isDigit (b) || b == Utility.ASCII_MINUS || b == Utility.ASCII_DOT) if (Utility.isDigit (b) || b == Utility.ASCII_MINUS || b == Utility.ASCII_DOT)