* app.c (do_scrub_chars): Provide a one character buffer to hold a
pushed back newline at the end of an unterminated quoted string.
This commit is contained in:
parent
3185aeeca7
commit
fc5910c0bb
|
@ -1,3 +1,8 @@
|
||||||
|
2007-07-20 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
|
* app.c (do_scrub_chars): Provide a one character buffer to hold a
|
||||||
|
pushed back newline at the end of an unterminated quoted string.
|
||||||
|
|
||||||
2007-07-14 Nick Clifton <nickc@redhat.com>
|
2007-07-14 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
* config/tc-arm.c (create_register_alias): Return a boolean rather
|
* config/tc-arm.c (create_register_alias): Return a boolean rather
|
||||||
|
|
|
@ -558,8 +558,14 @@ do_scrub_chars (int (*get) (char *, int), char *tostart, int tolen)
|
||||||
ch = GET ();
|
ch = GET ();
|
||||||
if (ch == EOF)
|
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);
|
as_warn (_("end of file in string; '%c' inserted"), quotechar);
|
||||||
state = old_state;
|
state = old_state;
|
||||||
|
from = fromend = one_char_buf + 1;
|
||||||
|
fromlen = 1;
|
||||||
UNGET ('\n');
|
UNGET ('\n');
|
||||||
PUT (quotechar);
|
PUT (quotechar);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue