From: Bernd Edlinger Date: Thu, 12 Mar 2020 10:52:34 +0000 (+0100) Subject: Fix the resizing condition of the line table X-Git-Url: http://git.efficios.com/?a=commitdiff_plain;h=bbe3dc410bd5c29955ef3409f9fee9e7c73b2c49;p=deliverable%2Fbinutils-gdb.git Fix the resizing condition of the line table That was wasting one element. 2020-04-01 Bernd Edlinger * buildsym.c (record_line): Fix the resizing condition. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 12f099559b..b94acffed6 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2020-04-01 Bernd Edlinger + + * buildsym.c (record_line): Fix the resizing condition. + 2020-04-01 Tom Tromey * value.h (value_literal_complex): Add comment. diff --git a/gdb/buildsym.c b/gdb/buildsym.c index 7155db34b0..2d1e4419d8 100644 --- a/gdb/buildsym.c +++ b/gdb/buildsym.c @@ -695,7 +695,7 @@ buildsym_compunit::record_line (struct subfile *subfile, int line, } } - if (subfile->line_vector->nitems + 1 >= subfile->line_vector_length) + if (subfile->line_vector->nitems >= subfile->line_vector_length) { subfile->line_vector_length *= 2; subfile->line_vector = (struct linetable *)