From 6b5473c97e98828d6d8509b13a257efbed308bad Mon Sep 17 00:00:00 2001 From: Ralf Habacker Date: Thu, 27 Aug 2020 15:59:53 +0100 Subject: [PATCH] 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 --- binutils/ChangeLog | 6 ++++++ binutils/mclex.c | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) 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 + + PR 26088 + * mclex.c (skip_until_eol): If eol was found, increment line + number. + 2020-08-27 Nick Alcock * 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; } -- 2.30.2