diff --git a/exprtk.hpp b/exprtk.hpp index 99b6df8..16d7556 100644 --- a/exprtk.hpp +++ b/exprtk.hpp @@ -22635,7 +22635,7 @@ namespace exprtk // Perform compile-time range check if (details::is_constant_node(index_expr)) { - const std::size_t index = std::size_t(index_expr->value()); + const std::size_t index = static_cast(details::numeric::to_int32(index_expr->value())); const std::size_t vec_size = vec->size(); if (index >= vec_size)