aboutsummaryrefslogtreecommitdiff
path: root/binutils/mclex.c
diff options
context:
space:
mode:
authorRalf Habacker <ralf.habacker@freenet.de>2020-08-27 15:59:53 +0100
committerNick Clifton <nickc@redhat.com>2020-08-27 15:59:53 +0100
commit6b5473c97e98828d6d8509b13a257efbed308bad (patch)
tree29eb188ae4d311150cd12ef65a956377adf2be7f /binutils/mclex.c
parentb886559f31fabb8bf234c1818dd01f8987e3c190 (diff)
downloadgdb-6b5473c97e98828d6d8509b13a257efbed308bad.zip
gdb-6b5473c97e98828d6d8509b13a257efbed308bad.tar.gz
gdb-6b5473c97e98828d6d8509b13a257efbed308bad.tar.bz2
Corrects the broken line number incrementation in the Windows resource parser
When the tokens MCLINE, MCENDLINE, and MCCOMMENT were created, the line number was not increased, which led to an incorrect value in the error output. PR 26088 * mclex.c (skip_until_eol): if eol was found, increment line number
Diffstat (limited to 'binutils/mclex.c')
-rw-r--r--binutils/mclex.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/binutils/mclex.c b/binutils/mclex.c
index da8bfb5..0cf85ee 100644
--- a/binutils/mclex.c
+++ b/binutils/mclex.c
@@ -334,7 +334,10 @@ skip_until_eol (void)
if (input_stream_pos[0] == 0)
return 0;
if (input_stream_pos[0] == '\n')
- ++input_stream_pos;
+ {
+ ++input_stream_pos;
+ input_line += 1;
+ }
return 1;
}