Fix Z80 assembly failure.
authorSergey Belyashov <sergey.belyashov@gmail.com>
Mon, 17 Jan 2022 13:00:17 +0000 (13:00 +0000)
committerNick Clifton <nickc@redhat.com>
Mon, 17 Jan 2022 13:00:17 +0000 (13:00 +0000)
PR 28762
* app.c (do_scrub_chars): Correct handling when the symbol is not 'af'.

gas/ChangeLog
gas/app.c

index 01080b943509ee07192a85c4c92db73f7f99a1c9..ddf4803ab18cb0adc57749a17f034049ffd8fbc6 100644 (file)
@@ -1,3 +1,8 @@
+2022-01-17  Sergey Belyashov  <sergey.belyashov@gmail.com>
+
+       PR 28762
+       * app.c (do_scrub_chars): Correct handling when the symbol is not 'af'.
+
 2021-12-16  Nick Clifton  <nickc@redhat.com>
 
        PR 28686
index c798b6a12e43b84b85d4385e722f930c5ed8fb70..dd96b410bad5f13ac0f96e8c4c80ae02ec356489 100644 (file)
--- a/gas/app.c
+++ b/gas/app.c
@@ -748,6 +748,8 @@ do_scrub_chars (size_t (*get) (char *, size_t), char *tostart, size_t tolen)
            }
          else
            {
+             if (ch != EOF)
+               UNGET (ch);
              state = 9;
              break;
            }