summaryrefslogtreecommitdiff
path: root/binutils
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
parentb886559f31fabb8bf234c1818dd01f8987e3c190 (diff)
downloadbinutils-gdb-6b5473c97e98828d6d8509b13a257efbed308bad.tar.gz
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')
-rw-r--r--binutils/ChangeLog6
-rw-r--r--binutils/mclex.c5
2 files changed, 10 insertions, 1 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 44c28985fb8..6ad05addb69 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,9 @@
+2020-08-27 Ralf Habacker <ralf.habacker@freenet.de>
+
+ PR 26088
+ * mclex.c (skip_until_eol): If eol was found, increment line
+ number.
+
2020-08-27 Nick Alcock <nick.alcock@oracle.com>
* objdump.c (dump_ctf_errs): Unquote CTF error messages.
diff --git a/binutils/mclex.c b/binutils/mclex.c
index da8bfb51311..0cf85eeddd4 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;
}