aboutsummaryrefslogtreecommitdiff
path: root/gas/app.c
diff options
context:
space:
mode:
Diffstat (limited to 'gas/app.c')
-rw-r--r--gas/app.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/gas/app.c b/gas/app.c
index 4ba9edc..8884d9b 100644
--- a/gas/app.c
+++ b/gas/app.c
@@ -676,7 +676,7 @@ do_scrub_chars (int (*get) (char *, int), char *tostart, int tolen)
if (ch == '\'')
/* Change to avoid warning about unclosed string. */
PUT ('`');
- else
+ else if (ch != EOF)
UNGET (ch);
break;
#endif
@@ -1097,7 +1097,8 @@ do_scrub_chars (int (*get) (char *, int), char *tostart, int tolen)
ch2 = GET ();
if (ch2 != '-')
{
- UNGET (ch2);
+ if (ch2 != EOF)
+ UNGET (ch2);
goto de_fault;
}
/* Read and skip to end of line. */
@@ -1283,7 +1284,8 @@ do_scrub_chars (int (*get) (char *, int), char *tostart, int tolen)
state = 9;
if (!IS_SYMBOL_COMPONENT (ch))
{
- UNGET (ch);
+ if (ch != EOF)
+ UNGET (ch);
break;
}
}
@@ -1407,4 +1409,3 @@ do_scrub_chars (int (*get) (char *, int), char *tostart, int tolen)
return to - tostart;
}
-