Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2011-09-16 14:03:08 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2011-09-16 14:03:08 +0400
commitc912af36cac3b6cbab7a6a9ccbb98c987b771d7d (patch)
tree05bfc3c9959dde51176239fb31578a048f4ddbbc /source/blender/blenkernel/intern/unit.c
parent8ca82cec46944da31302616306d57931e3a04e86 (diff)
Fix #28663: All "unit" properties show a value of 0 (on WinXP&MinGW&scons)
Initially problem was caused by updated version of mingw-runtime which changed behavior of snprintf and vsnprintf so %lf isn't anymore valid for doubles. According to manpages, %f is a correct format for snprintf for doubles.
Diffstat (limited to 'source/blender/blenkernel/intern/unit.c')
-rw-r--r--source/blender/blenkernel/intern/unit.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/unit.c b/source/blender/blenkernel/intern/unit.c
index 72fe1c19884..8aeef0d84b1 100644
--- a/source/blender/blenkernel/intern/unit.c
+++ b/source/blender/blenkernel/intern/unit.c
@@ -345,7 +345,7 @@ static int unit_as_string(char *str, int len_max, double value, int prec, bUnitC
/* Convert to a string */
{
- len= BLI_snprintf(str, len_max, "%.*lf", prec, value_conv);
+ len= BLI_snprintf(str, len_max, "%.*f", prec, value_conv);
if(len >= len_max)
len= len_max;