mirror of
https://github.com/ggml-org/llama.cpp.git
synced 2025-10-28 08:31:25 +00:00
tests : avoid sprintf in test-model-random
This commit is contained in:
@@ -342,7 +342,7 @@ struct model_variant {
|
||||
|
||||
char buf[32];
|
||||
for (size_t i = 0; i < n_vocab; ++i) {
|
||||
sprintf(buf, "<%zu>", i);
|
||||
snprintf(buf, sizeof(buf), "<%zu>", i);
|
||||
vocab_tokens[i] = std::string(buf);
|
||||
vocab_scores[i] = -1000.0f;
|
||||
vocab_types[i] = 4; // USER_DEFINED type
|
||||
|
||||
Reference in New Issue
Block a user