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 760e0660c8
commit 8de159289a

View file

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