From 21dc4ddaf21b8ed551d717e7606abd2cffbacdbf Mon Sep 17 00:00:00 2001 From: LaffeyNyaa <112215776+LaffeyNyaa@users.noreply.github.com> Date: Sat, 23 Aug 2025 16:38:30 +0800 Subject: [PATCH] chat : fix debug build assertion in trim function (#15520) --- src/llama-chat.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/llama-chat.cpp b/src/llama-chat.cpp index 0a96a9a579..4d6fdf8226 100644 --- a/src/llama-chat.cpp +++ b/src/llama-chat.cpp @@ -16,10 +16,10 @@ static std::string trim(const std::string & str) { size_t start = 0; size_t end = str.size(); - while (start < end && isspace(str[start])) { + while (start < end && isspace(static_cast(str[start]))) { start += 1; } - while (end > start && isspace(str[end - 1])) { + while (end > start && isspace(static_cast(str[end - 1]))) { end -= 1; } return str.substr(start, end - start);