diff options
Diffstat (limited to 'gdb/valops.c')
-rw-r--r-- | gdb/valops.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gdb/valops.c b/gdb/valops.c index 09af0ae..1b63343 100644 --- a/gdb/valops.c +++ b/gdb/valops.c @@ -1695,6 +1695,9 @@ value_array (int lowbound, gdb::array_view<struct value *> elemvec) /* Validate that the bounds are reasonable and that each of the elements have the same size. */ + if (elemvec.empty ()) + error (_("size of the array element must not be zero")); + typelength = type_length_units (elemvec[0]->enclosing_type ()); for (struct value *other : elemvec.slice (1)) { |