[Bf-blender-cvs] [ba546976c30] master: Fix BLI_str_rstrip skipping the first character
Campbell Barton
noreply at git.blender.org
Fri Feb 28 01:53:41 CET 2020
Commit: ba546976c309713680cd2eb4a858da937b77e0e1
Author: Campbell Barton
Date: Fri Feb 28 11:46:52 2020 +1100
Branches: master
https://developer.blender.org/rBba546976c309713680cd2eb4a858da937b77e0e1
Fix BLI_str_rstrip skipping the first character
===================================================================
M source/blender/blenlib/intern/string.c
===================================================================
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';
}
More information about the Bf-blender-cvs
mailing list