jinja : correct default size for string slices (#19913)

This commit is contained in:
Eric Zhang 2026-02-26 19:28:09 +08:00 committed by GitHub
parent 66287bdaac
commit 9b62913b40
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 0 deletions

View File

@ -721,6 +721,8 @@ value member_expression::execute_impl(context & ctx) {
int64_t arr_size = 0;
if (is_val<value_array>(object)) {
arr_size = object->as_array().size();
} else if (is_val<value_string>(object)) {
arr_size = object->as_string().length();
}
if (is_stmt<slice_expression>(this->property)) {