[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [50165] trunk/blender/source/blender/ editors/space_logic/logic_window.c: bugfix for [32368] Added controllers don't count over 10

Dalai Felinto dfelinto at gmail.com
Thu Aug 23 19:37:04 CEST 2012


Revision: 50165
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=50165
Author:   dfelinto
Date:     2012-08-23 17:37:04 +0000 (Thu, 23 Aug 2012)
Log Message:
-----------
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

Modified Paths:
--------------
    trunk/blender/source/blender/editors/space_logic/logic_window.c

Modified: trunk/blender/source/blender/editors/space_logic/logic_window.c
===================================================================
--- trunk/blender/source/blender/editors/space_logic/logic_window.c	2012-08-23 17:16:11 UTC (rev 50164)
+++ trunk/blender/source/blender/editors/space_logic/logic_window.c	2012-08-23 17:37:04 UTC (rev 50165)
@@ -109,7 +109,7 @@
 	x1= (char **)v1;
 	x2= (char **)v2;
 	
-	return strcmp(*x1, *x2);
+	return BLI_natstrcmp(*x1, *x2);
 }
 
 void make_unique_prop_names(bContext *C, char *str)




More information about the Bf-blender-cvs mailing list