From a4beac13f490004f7dc5c3beb6f5f608833ce6cd Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Fri, 20 Jul 2007 08:20:27 +0000 Subject: * app.c (do_scrub_chars): Provide a one character buffer to hold a pushed back newline at the end of an unterminated quoted string. --- gas/app.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gas/app.c') diff --git a/gas/app.c b/gas/app.c index 637662f818..d8d0cc552d 100644 --- a/gas/app.c +++ b/gas/app.c @@ -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); } -- cgit v1.2.1