diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2012-08-23 21:37:04 +0400 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2012-08-23 21:37:04 +0400 |
commit | dfbc793d885ae603089e5764cdd25fb2c983a03b (patch) | |
tree | 3be8831b04f3042e5f843e4c4bd3d79ed00d42be | |
parent | f6a6fa419ea667b05180b2608db3edc15f171dd0 (diff) |
bugfix for [32368] Added controllers don't count over 10
Blender original code (NaN likely) was relying on strcmp to sort the list of controllers.
As it happens, in strcmp 10 < 2, thus the list was never in the right order.
The curious thing is that in 2.49 it worked, but I think it did because the make_unique_prop_names function was called twice. Strange ;)
The solution is to use blender BLI_natstrcmp to do natural sorting
-rw-r--r-- | source/blender/editors/space_logic/logic_window.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/space_logic/logic_window.c b/source/blender/editors/space_logic/logic_window.c index 915e5c20e99..a8bd0a443fa 100644 --- a/source/blender/editors/space_logic/logic_window.c +++ b/source/blender/editors/space_logic/logic_window.c @@ -109,7 +109,7 @@ static int vergname(const void *v1, const void *v2) x1= (char **)v1; x2= (char **)v2; - return strcmp(*x1, *x2); + return BLI_natstrcmp(*x1, *x2); } void make_unique_prop_names(bContext *C, char *str) |