diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-02-28 03:46:52 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-02-28 03:46:52 +0300 |
commit | ba546976c309713680cd2eb4a858da937b77e0e1 (patch) | |
tree | a46f070ba4d85f82a92fd2dd364d984c14cd14a0 | |
parent | 28fca2c588fdfb44919ec82eddab19d8cf2e8c9e (diff) |
Fix BLI_str_rstrip skipping the first character
-rw-r--r-- | source/blender/blenlib/intern/string.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenlib/intern/string.c b/source/blender/blenlib/intern/string.c index 7f5b1e7ea65..99db2f0a290 100644 --- a/source/blender/blenlib/intern/string.c +++ b/source/blender/blenlib/intern/string.c @@ -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'; } |