Fix strtrim to correctly trim strings containing only whitespace

This commit is contained in:
Andrea Mazzoleni 2026-07-06 18:11:43 +02:00
parent 15246b6eaf
commit 4ce9d9ee22

View file

@ -1140,7 +1140,7 @@ char* strtrim(char* str)
end[0] = 0;
if (begin != end)
if (begin != str)
memmove(str, begin, end - begin + 1);
return str;