diff options
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/source.c | 7 |
2 files changed, 6 insertions, 6 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 8230afc..3ea7576 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2019-01-08 Andrew Burgess <andrew.burgess@embecosm.com> + + * source.c (print_source_lines_base): Fix skip of '\r' if next + character is '\n'. + 2019-01-06 Tom Tromey <tom@tromey.com> * c-exp.y (struct c_parse_state) <macro_original_text, diff --git a/gdb/source.c b/gdb/source.c index ad6c646..e77789c 100644 --- a/gdb/source.c +++ b/gdb/source.c @@ -1379,12 +1379,7 @@ print_source_lines_base (struct symtab *s, int line, int stopline, else if (c == '\r') { /* Skip a \r character, but only before a \n. */ - if (iter[1] == '\n') - { - ++iter; - c = '\n'; - } - else + if (*iter != '\n') printf_filtered ("^%c", c + 0100); } else |