From 1c9f699cd9c816946535115db84ec0d0ce6bf330 Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Tue, 4 Nov 2008 15:32:54 +0000 Subject: * eval.c (evaluate_subexp_standard): Assert that there is at least one array dimension. --- gdb/eval.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gdb/eval.c') diff --git a/gdb/eval.c b/gdb/eval.c index 4394aa1..ccb6b742 100644 --- a/gdb/eval.c +++ b/gdb/eval.c @@ -1976,6 +1976,8 @@ evaluate_subexp_standard (struct type *expect_type, if (nargs != ndimensions) error (_("Wrong number of subscripts")); + gdb_assert (nargs > 0); + /* Now that we know we have a legal array subscript expression let us actually find out where this element exists in the array. */ -- cgit v1.1