[Bf-blender-cvs] [f51ef8a] master: Correction to own previous rB9c0de0084bfe.

Bastien Montagne noreply at git.blender.org
Wed Mar 2 18:12:26 CET 2016


Commit: f51ef8ac4d3f94036463fac9fb59ec8266e0197d
Author: Bastien Montagne
Date:   Wed Mar 2 18:09:32 2016 +0100
Branches: master
https://developer.blender.org/rBf51ef8ac4d3f94036463fac9fb59ec8266e0197d

Correction to own previous rB9c0de0084bfe.

'1mm+1m' would fail with original fix, now consuming all alpha chars before checking unit again...

===================================================================

M	source/blender/blenkernel/intern/unit.c

===================================================================

diff --git a/source/blender/blenkernel/intern/unit.c b/source/blender/blenkernel/intern/unit.c
index e3ea5b9..3d7ba82 100644
--- a/source/blender/blenkernel/intern/unit.c
+++ b/source/blender/blenkernel/intern/unit.c
@@ -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;




More information about the Bf-blender-cvs mailing list