From b9a32f464f8528476d6af7a837bb8fd8ce3a977f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20du=20Hamel?= Date: Wed, 25 Sep 2024 01:20:53 +0200 Subject: [PATCH] compress: Fix missing c_str() --- examples/compress/compress.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/compress/compress.cpp b/examples/compress/compress.cpp index 7636019e2..a0f79005f 100644 --- a/examples/compress/compress.cpp +++ b/examples/compress/compress.cpp @@ -73,13 +73,13 @@ std::vector encode(llama_context *ctx, std::vector inp, gp llama_token candidate = tok.id; if (candidate == inp[index]) { - LOG("%s", llama_token_to_piece(ctx, candidate)); + LOG("%s", llama_token_to_piece(ctx, candidate).c_str()); match = i; break; } } if(match<0){ - LOG_ERR("\n couldn't match %s", llama_token_to_piece(ctx, inp[index])); + LOG_ERR("\n couldn't match %s", llama_token_to_piece(ctx, inp[index]).c_str()); exit(1); } sample_ids.push_back(match);