* value.c (mark_value_bytes_unavailable): Fix indexing the `bef'

range.
This commit is contained in:
Pedro Alves 2011-02-14 12:54:42 +00:00
parent e730304246
commit 6bfc80c738
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2011-02-14 Pedro Alves <pedro@codesourcery.com>
Jan Kratochvil <jan.kratochvil@redhat.com>
* value.c (mark_value_bytes_unavailable): Fix indexing the `bef'
range.
2011-02-14 Pedro Alves <pedro@codesourcery.com>
* value.c (value_bits_valid, value_bits_synthetic_pointer):

View File

@ -439,7 +439,7 @@ mark_value_bytes_unavailable (struct value *value, int offset, int length)
i = VEC_lower_bound (range_s, value->unavailable, &newr, range_lessthan);
if (i > 0)
{
struct range *bef = VEC_index (range_s, value->unavailable, i - i);
struct range *bef = VEC_index (range_s, value->unavailable, i - 1);
if (ranges_overlap (bef->offset, bef->length, offset, length))
{