diff options
Diffstat (limited to 'gdb/ada-lang.c')
-rw-r--r-- | gdb/ada-lang.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gdb/ada-lang.c b/gdb/ada-lang.c index 3a00e5b..e3fa363 100644 --- a/gdb/ada-lang.c +++ b/gdb/ada-lang.c @@ -2544,6 +2544,8 @@ ada_value_primitive_packed_val (struct value *obj, const gdb_byte *valaddr, accum |= sign << accumSize; unpacked[targ] = accum & ~(~0L << HOST_CHAR_BIT); accumSize -= HOST_CHAR_BIT; + if (accumSize < 0) + accumSize = 0; accum >>= HOST_CHAR_BIT; ntarg -= 1; targ += delta; |