Correction to own previous rB9c0de0084bfe.
authorBastien Montagne <montagne29@wanadoo.fr>
Wed, 2 Mar 2016 17:09:32 +0000 (18:09 +0100)
committerBastien Montagne <montagne29@wanadoo.fr>
Wed, 2 Mar 2016 17:12:14 +0000 (18:12 +0100)
'1mm+1m' would fail with original fix, now consuming all alpha chars before checking unit again...

source/blender/blenkernel/intern/unit.c

index e3ea5b9ba3f526697ad48597bf510c2e042a4faa..3d7ba8276f08b2a24fc6d0d21dacbbd7205cb312 100644 (file)
@@ -479,7 +479,8 @@ static const char *unit_find_str(const char *str, const char *substr)
                                        }
                                }
                                /* If str_found is not a valid unit, we have to check further in the string... */
-                               str = str_found + 1;
+                               for (str_found++; isalpha_or_utf8(*str_found); str_found++);
+                               str = str_found;
                        }
                        else {
                                break;