diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/basic.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/basic.c b/src/basic.c index d823ec7..9c71374 100644 --- a/src/basic.c +++ b/src/basic.c @@ -51,6 +51,8 @@ static inline enum zx_basic_token_type zx_basic_token_type_get(uint8_t b) { return ZX81_BASIC_TOKEN_INTEGRAL; } else if (ZX81_CHAR_TOKEN_FLOAT(b)) { return ZX81_BASIC_TOKEN_FLOAT; + } else if (ZX81_CHAR_NEWLINE(b)) { + return ZX81_BASIC_TOKEN_NEWLINE; } return ZX81_BASIC_TOKEN_UNKNOWN; @@ -158,6 +160,9 @@ ssize_t zx81_basic_dump(int fd, FILE *stream) { i += 5; break; + case ZX81_BASIC_TOKEN_NEWLINE: + break; + case ZX81_BASIC_TOKEN_UNKNOWN: continue; } @@ -172,10 +177,6 @@ ssize_t zx81_basic_dump(int fd, FILE *stream) { last = c; } - - if (fputc('\n', stream) < 0) { - goto error_io; - } } free(buf); |