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.
This commit is contained in:
Bernd Edlinger 2020-03-12 11:52:34 +01:00
parent 382aae0632
commit bbe3dc410b
2 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2020-04-01 Bernd Edlinger <bernd.edlinger@hotmail.de>
* buildsym.c (record_line): Fix the resizing condition.
2020-04-01 Tom Tromey <tom@tromey.com>
* value.h (value_literal_complex): Add comment.

View File

@ -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 *)