From: LaffeyNyaa Date: Sat, 23 Aug 2025 08:38:30 +0000 (+0800) Subject: chat : fix debug build assertion in trim function (#15520) X-Git-Tag: upstream/0.0.6527~272 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=21dc4ddaf21b8ed551d717e7606abd2cffbacdbf;p=pkg%2Fggml%2Fsources%2Fllama.cpp chat : fix debug build assertion in trim function (#15520) --- diff --git a/src/llama-chat.cpp b/src/llama-chat.cpp index 0a96a9a5..4d6fdf82 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);