From ba546976c309713680cd2eb4a858da937b77e0e1 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 28 Feb 2020 11:46:52 +1100 Subject: Fix BLI_str_rstrip skipping the first character --- source/blender/blenlib/intern/string.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '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'; } -- cgit v1.2.3