diff options
-rw-r--r-- | source/blender/blenkernel/intern/unit.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/unit.c b/source/blender/blenkernel/intern/unit.c index 3c03712231a..4b6ac824fd8 100644 --- a/source/blender/blenkernel/intern/unit.c +++ b/source/blender/blenkernel/intern/unit.c @@ -609,9 +609,10 @@ int bUnit_ReplaceString(char *str, int len_max, const char *str_prev, double sca int i; char *ch = str; - for (i = 0; (i >= len_max || *ch == '\0'); i++, ch++) + for (i = 0; (i < len_max || *ch != '\0'); i++, ch++) { if ((*ch >= 'A') && (*ch <= 'Z')) *ch += ('a' - 'A'); + } } for (unit = usys->units; unit->name; unit++) { |