From 2b4106bf017ffd2dae0c63afb23513763d9083d4 Mon Sep 17 00:00:00 2001 From: Samuel Felton Date: Fri, 4 Oct 2024 16:00:38 +0200 Subject: [PATCH] Fix wrong indexing exception --- modules/python/bindings/include/core/utils.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/python/bindings/include/core/utils.hpp b/modules/python/bindings/include/core/utils.hpp index a64faf7682..baf24cea97 100644 --- a/modules/python/bindings/include/core/utils.hpp +++ b/modules/python/bindings/include/core/utils.hpp @@ -158,7 +158,7 @@ std::tuple solveSliceIndices(py::slice slice, unsigned int s endI = size + endI; } - if (endI >= static_cast(size)) { + if (endI > static_cast(size)) { throw std::runtime_error("Invalid slice indexing out of array"); } }