summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgliptic <gliptic@users.noreply.github.com>2024-03-11 20:59:03 +0100
committerGitHub <noreply@github.com>2024-03-11 21:59:03 +0200
commit5cdb371731caa2c41fcca42d4d2d43f94f6883b4 (patch)
tree3b700c583ee109259e41353e93ef9486c9bad214
parent44ca159faf4fbe1a7ace13a962845ba7cdfd95ec (diff)
grammar : fix unnecessarily retained pointer to rules (#6003)
-rw-r--r--llama.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llama.cpp b/llama.cpp
index 98ec147a..ad7b7b7d 100644
--- a/llama.cpp
+++ b/llama.cpp
@@ -10538,7 +10538,7 @@ struct llama_grammar * llama_grammar_init(
// loop over alternates of start rule to build initial stacks
std::vector<std::vector<const llama_grammar_element *>> stacks;
- pos = rules[start_rule_index];
+ pos = vec_rules[start_rule_index].data();
do {
std::vector<const llama_grammar_element *> stack;
if (!llama_grammar_is_end_of_sequence(pos)) {