Fix BLI_str_rstrip skipping the first character

This commit is contained in:
Campbell Barton 2020-02-28 11:46:52 +11:00
parent 28fca2c588
commit ba546976c3
1 changed files with 1 additions and 1 deletions

View File

@ -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';
}