diff options
-rw-r--r-- | main.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -43,8 +43,6 @@ #define ZX_CHAR_TOKEN(c) \ (ZX_CHAR_TOKEN_LOW(c) || ZX_CHAR_TOKEN_HIGH(c)) -#define ZX_BASIC_STATE_SIZE 116 - #define ZX_CHAR_TOKEN_INTEGRAL(c) \ (c == 0x0e) @@ -55,6 +53,9 @@ typedef struct _zx_basic_line { uint16_t num, len; } zx_basic_line; +#define ZX_BASIC_STATE_SIZE 116 +#define ZX_BASIC_LINE_LAST 0x7676 + static uint32_t zx_charset[ZX_DUMP_CHARSET_LEN] = { 0x0020, 0x2598, 0x259d, 0x2580, 0x2596, 0x258c, 0x259e, 0x259b, 0x2592, '.', '.', '"', 0x00a3, '$', ':', '?', @@ -281,7 +282,7 @@ static ssize_t zx_dump_basic(int fd) { len = le16toh(line.len); - if (be16toh(line.num) == len) { + if (be16toh(line.num) == len && len == ZX_BASIC_LINE_LAST) { break; } |