[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [45540] trunk/blender/source/gameengine/ GameLogic/SCA_KeyboardSensor.cpp: Game engine: pass string length to BLI_str_cursor_step_prev_utf8 rather than NULL

Sergey Sharybin sergey.vfx at gmail.com
Wed Apr 11 15:17:14 CEST 2012


Revision: 45540
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=45540
Author:   nazgul
Date:     2012-04-11 13:17:13 +0000 (Wed, 11 Apr 2012)
Log Message:
-----------
Game engine: pass string length to BLI_str_cursor_step_prev_utf8 rather than NULL

That's what this function expect (but somehow does not use) and it gave compilation
error when using gcc-4.6.3 from debian linux.

Modified Paths:
--------------
    trunk/blender/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp

Modified: trunk/blender/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp
===================================================================
--- trunk/blender/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp	2012-04-11 11:52:21 UTC (rev 45539)
+++ trunk/blender/source/gameengine/GameLogic/SCA_KeyboardSensor.cpp	2012-04-11 13:17:13 UTC (rev 45540)
@@ -344,7 +344,7 @@
 				if (oldlength >= 1 ) {
 					int newlength=oldlength;
 
-					BLI_str_cursor_step_prev_utf8(newprop, NULL, &newlength);
+					BLI_str_cursor_step_prev_utf8(newprop, newprop.Length(), &newlength);
 					newprop.SetLength(newlength);
 
 					CStringValue * newstringprop = new CStringValue(newprop, m_targetprop);




More information about the Bf-blender-cvs mailing list