From d5beb09c8a396fe906dd680cd7154c6c4e0d9909 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Thu, 27 Feb 2025 04:21:13 -0500 Subject: listamsb: print "" correctly (" embedded in a string). --- listamsb.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/listamsb.c b/listamsb.c index b49b74e..1c59659 100644 --- a/listamsb.c +++ b/listamsb.c @@ -317,7 +317,11 @@ int next_line(void) { continue; } } - if(printing) putc(byte, outfile); + if(printing) { + putc(byte, outfile); + /* one " character embedded in a string gets printed as "" */ + if(byte == '"') putc(byte, outfile); + } } else if(in_comment) { if(byte == 0x00) break; if(printing) putc(byte, outfile); -- cgit v1.2.3