diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2007-05-28 19:32:58 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@codesourcery.com> | 2007-05-28 19:32:58 +0000 |
commit | 1740b7b1d54cee1dd19851fc47efa18e6d21d40e (patch) | |
tree | 4ac4841866aa7418bb5233cd87471864b2a2f9e5 /gas/app.c | |
parent | 8905984da1fc92ba7d65022b5c878ae7de866542 (diff) | |
download | gdb-1740b7b1d54cee1dd19851fc47efa18e6d21d40e.zip gdb-1740b7b1d54cee1dd19851fc47efa18e6d21d40e.tar.gz gdb-1740b7b1d54cee1dd19851fc47efa18e6d21d40e.tar.bz2 |
* app.c (do_scrub_chars): Cope with \ at end of buffer.x
Diffstat (limited to 'gas/app.c')
-rw-r--r-- | gas/app.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -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; |