Skip to content

Commit

Permalink
Fix wrong indexing exception
Browse files Browse the repository at this point in the history
  • Loading branch information
SamFlt committed Oct 4, 2024
1 parent 9d199e9 commit 2b4106b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/python/bindings/include/core/utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ std::tuple<int, int, int, int> solveSliceIndices(py::slice slice, unsigned int s
endI = size + endI;
}

if (endI >= static_cast<int>(size)) {
if (endI > static_cast<int>(size)) {
throw std::runtime_error("Invalid slice indexing out of array");
}
}
Expand Down

0 comments on commit 2b4106b

Please sign in to comment.