Fix BLI_str_rstrip skipping the first character
This commit is contained in:
parent
28fca2c588
commit
ba546976c3
|
@ -818,7 +818,7 @@ void BLI_str_toupper_ascii(char *str, const size_t len)
|
|||
*/
|
||||
void BLI_str_rstrip(char *str)
|
||||
{
|
||||
for (int i = (int)strlen(str) - 1; i > 0; i--) {
|
||||
for (int i = (int)strlen(str) - 1; i >= 0; i--) {
|
||||
if (isspace(str[i])) {
|
||||
str[i] = '\0';
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue