File tree 1 file changed +2
-1
lines changed
1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -1223,6 +1223,7 @@ static exprt substitute_array_access(
1223
1223
&symbol_generator)
1224
1224
{
1225
1225
const typet &char_type = array_expr.type ().subtype ();
1226
+ const typet &index_type = to_array_type (array_expr.type ()).size ().type ();
1226
1227
const std::vector<exprt> &operands = array_expr.operands ();
1227
1228
1228
1229
exprt result = symbol_generator (" out_of_bound_access" , char_type);
@@ -1231,7 +1232,7 @@ static exprt substitute_array_access(
1231
1232
{
1232
1233
// Go in reverse order so that smaller indexes appear first in the result
1233
1234
const std::size_t pos = operands.size () - 1 - i;
1234
- const equal_exprt equals (index , from_integer (pos, java_int_type () ));
1235
+ const equal_exprt equals (index , from_integer (pos, index_type ));
1235
1236
if (operands[pos].type () != char_type)
1236
1237
{
1237
1238
INVARIANT (
You can’t perform that action at this time.
0 commit comments