]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
jinja : correct default size for string slices (#19913)
authorEric Zhang <redacted>
Thu, 26 Feb 2026 11:28:09 +0000 (19:28 +0800)
committerGitHub <redacted>
Thu, 26 Feb 2026 11:28:09 +0000 (12:28 +0100)
common/jinja/runtime.cpp

index c93e182a7e25fdce5e32d18b4afd406a66245bdc..5757c76b7a1b7c6a906a68f4ca1d03728b6b519f 100644 (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)) {