aboutsummaryrefslogtreecommitdiff
path: root/listamsb.c
diff options
context:
space:
mode:
Diffstat (limited to 'listamsb.c')
-rw-r--r--listamsb.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/listamsb.c b/listamsb.c
index 0372bbf..17ca3fc 100644
--- a/listamsb.c
+++ b/listamsb.c
@@ -316,10 +316,11 @@ int next_line(void) {
byte = read_prog_byte();
if(in_string) {
- /* null byte ends both the string and the line of code.
- don't print a closing quote because AMSB doesn't. */
- if(byte == 0x00) break;
- if (byte == '|') {
+ if(byte == 0x00) {
+ /* null byte ends both the string and the line of code.
+ don't print a closing quote because AMSB doesn't. */
+ break;
+ } else if(byte == '|') {
/* pipe is how AMSB stores the closing quote. end the string
but not the line of code, and print a " character. */
in_string = 0;