aboutsummaryrefslogtreecommitdiff
path: root/gdb/buildsym.c
diff options
context:
space:
mode:
authorBernd Edlinger <bernd.edlinger@hotmail.de>2020-03-12 11:52:34 +0100
committerBernd Edlinger <bernd.edlinger@hotmail.de>2020-04-01 23:37:46 +0200
commitbbe3dc410bd5c29955ef3409f9fee9e7c73b2c49 (patch)
tree16d39c57d32e69eea60440c1d0abfdbe483f9617 /gdb/buildsym.c
parent382aae06322799a25ea52fe61b243cbca4db8d66 (diff)
downloadgdb-bbe3dc410bd5c29955ef3409f9fee9e7c73b2c49.zip
gdb-bbe3dc410bd5c29955ef3409f9fee9e7c73b2c49.tar.gz
gdb-bbe3dc410bd5c29955ef3409f9fee9e7c73b2c49.tar.bz2
Fix the resizing condition of the line table
That was wasting one element. 2020-04-01 Bernd Edlinger <bernd.edlinger@hotmail.de> * buildsym.c (record_line): Fix the resizing condition.
Diffstat (limited to 'gdb/buildsym.c')
-rw-r--r--gdb/buildsym.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/buildsym.c b/gdb/buildsym.c
index 7155db3..2d1e441 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 *)