Skip to content

Commit 21dc4dd

Browse files
authored
chat : fix debug build assertion in trim function (ggml-org#15520)
1 parent 289bf41 commit 21dc4dd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/llama-chat.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
static std::string trim(const std::string & str) {
1717
size_t start = 0;
1818
size_t end = str.size();
19-
while (start < end && isspace(str[start])) {
19+
while (start < end && isspace(static_cast<unsigned char>(str[start]))) {
2020
start += 1;
2121
}
22-
while (end > start && isspace(str[end - 1])) {
22+
while (end > start && isspace(static_cast<unsigned char>(str[end - 1]))) {
2323
end -= 1;
2424
}
2525
return str.substr(start, end - start);

0 commit comments

Comments
 (0)