]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gas: scrubber handling of string continuation across lines
authorJan Beulich <jbeulich@suse.com>
Fri, 17 Jul 2026 07:23:55 +0000 (09:23 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 17 Jul 2026 07:23:55 +0000 (09:23 +0200)
Apparently forever (according to [available] history) two backslashes have
been emitted when, afaict, only one was meant.

gas/app.c

index 3410e69657213d9eb28d824981be4c8c1ccbacbf..e5b65bc01523f2ecf1d4bf1b0b9c21da81aab8c4 100644 (file)
--- a/gas/app.c
+++ b/gas/app.c
@@ -694,12 +694,12 @@ do_scrub_chars (size_t (*get) (char *, size_t), char *tostart, size_t tolen,
          ch = GET ();
          switch (ch)
            {
-             /* Handle strings broken across lines, by turning '\n' into
-                '\\' and 'n'.  */
+             /* Handle strings broken across lines, by turning '\\' followed
+                by '\n' into '\\' (already emitted when state moved to 6) and
+                'n'.  */
            case '\n':
-             UNGET ('n');
              add_newlines++;
-             PUT ('\\');
+             PUT ('n');
              continue;
 
            case EOF: