From 1fbf21eec4023819d687f03af1277a32a5808b50 Mon Sep 17 00:00:00 2001 From: Concedo <39025047+LostRuins@users.noreply.github.com> Date: Mon, 19 Aug 2024 13:06:39 +0800 Subject: [PATCH] Revert "fix out of bounds access" This reverts commit 3ac183633aa62fa2aae4ab2d19d016ca4ab7531c. --- examples/llava/clip.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/llava/clip.cpp b/examples/llava/clip.cpp index 224db9b56..342042ffb 100644 --- a/examples/llava/clip.cpp +++ b/examples/llava/clip.cpp @@ -2419,7 +2419,7 @@ bool clip_image_batch_encode(clip_ctx * ctx, const int n_threads, const clip_ima struct ggml_tensor * patches = ggml_graph_get_tensor(gf, "patches"); int* patches_data = (int*)malloc(ggml_nbytes(patches)); for (int i = 0; i < num_patches; i++) { - patches_data[i] = i; + patches_data[i] = i + 1; } ggml_backend_tensor_set(patches, patches_data, 0, ggml_nbytes(patches)); free(patches_data);