* app.c (do_scrub_chars): Cope with \ at end of buffer.x

This commit is contained in:
Nathan Sidwell 2007-05-28 19:32:58 +00:00
parent 8905984da1
commit 1740b7b1d5
2 changed files with 13 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2007-05-28 Nathan Sidwell <nathan@codesourcery.com>
* app.c (do_scrub_chars): Cope with \ at end of buffer.
2007-05-26 Alan Modra <amodra@bigpond.net.au>
* config/tc-ppc.c (ppc_insert_operand): Truncate sign bits in

View File

@ -1360,7 +1360,15 @@ do_scrub_chars (int (*get) (char *, int), char *tostart, int tolen)
the space. We don't have enough information to
make the right choice, so here we are making the
choice which is more likely to be correct. */
PUT (' ');
if (to + 1 >= toend)
{
/* If we're near the end of the buffer, save the
character for the next time round. Otherwise
we'll lose our state. */
UNGET (ch);
goto tofull;
}
*to++ = ' ';
}
state = 3;