Fix #28663: All "unit" properties show a value of 0 (on WinXP&MinGW&scons)
authorSergey Sharybin <sergey.vfx@gmail.com>
Wed, 7 Dec 2011 17:23:45 +0000 (17:23 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Wed, 7 Dec 2011 17:23:45 +0000 (17:23 +0000)
Use %g instead of %lg due to %g is supposed to be used for doubles and %lg confuses mingw at all

source/blender/blenkernel/intern/unit.c

index 616c27f6b0b59180f916a0fd6a59e80ed2fecd06..aa914998a72b1fec522b934cc95e85f72dd540eb 100644 (file)
@@ -494,7 +494,7 @@ static int unit_scale_str(char *str, int len_max, char *str_tmp, double scale_pr
 
                len_name = strlen(replace_str);
                len_move= (len - (found_ofs+len_name)) + 1; /* 1+ to copy the string terminator */
-               len_num= BLI_snprintf(str_tmp, TEMP_STR_SIZE, "*%lg"SEP_STR, unit->scalar/scale_pref); /* # removed later */
+               len_num= BLI_snprintf(str_tmp, TEMP_STR_SIZE, "*%g"SEP_STR, unit->scalar/scale_pref); /* # removed later */
 
                if(len_num > len_max)
                        len_num= len_max;