Skip to content

Commit 3088273

Browse files
committed
Fix error message
1 parent 6307a56 commit 3088273

File tree

1 file changed

+1
-1
lines changed
  • graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/memoryview

1 file changed

+1
-1
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/memoryview/MemoryViewNodes.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,7 @@ private void lookupDimension(PMemoryView self, MemoryPointer ptr, int dim, int i
642642
index += nitems;
643643
}
644644
if (index < 0 || index >= nitems) {
645-
throw raise(IndexError, ErrorMessages.INDEX_OUT_OF_BOUNDS_ON_DIMENSION_D, dim);
645+
throw raise(IndexError, ErrorMessages.INDEX_OUT_OF_BOUNDS_ON_DIMENSION_D, dim + 1);
646646
}
647647

648648
ptr.offset += self.getBufferStrides()[dim] * index;

0 commit comments

Comments
 (0)