diff options
author | Nick Clifton <nickc@redhat.com> | 2007-07-20 08:20:27 +0000 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2007-07-20 08:20:27 +0000 |
commit | a4beac13f490004f7dc5c3beb6f5f608833ce6cd (patch) | |
tree | cb15d578a44268c6b3182b1e85784c81b1aaf160 /gas/app.c | |
parent | 89d60ebe5989297e483be84c48f14a6a0e31b973 (diff) | |
download | binutils-redhat-a4beac13f490004f7dc5c3beb6f5f608833ce6cd.tar.gz |
* app.c (do_scrub_chars): Provide a one character buffer to hold a
pushed back newline at the end of an unterminated quoted string.
Diffstat (limited to 'gas/app.c')
-rw-r--r-- | gas/app.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -558,8 +558,14 @@ do_scrub_chars (int (*get) (char *, int), char *tostart, int tolen) ch = GET (); if (ch == EOF) { + /* This buffer is here specifically so + that the UNGET below will work. */ + static char one_char_buf[1]; + as_warn (_("end of file in string; '%c' inserted"), quotechar); state = old_state; + from = fromend = one_char_buf + 1; + fromlen = 1; UNGET ('\n'); PUT (quotechar); } |