aboutsummaryrefslogtreecommitdiff
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
parentb886559f31fabb8bf234c1818dd01f8987e3c190 (diff)
downloadfsf-binutils-gdb-6b5473c97e98828d6d8509b13a257efbed308bad.zip
fsf-binutils-gdb-6b5473c97e98828d6d8509b13a257efbed308bad.tar.gz
fsf-binutils-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
-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 44c2898..6ad05ad 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 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;
}