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:
authorBastien Montagne <montagne29@wanadoo.fr>2017-05-30 10:46:53 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2017-05-30 10:46:53 +0300
commit76c97aaff94c199573463256a2ed7ff8d3d56dde (patch)
treef29e77fb2b1142ba5aefd433e4390cf6ad947d5c
parent9b914764a9f9b9c02986448876af85aa6e687516 (diff)
Fix T50775: Missing parenthesis on fluid bake button.
Yep, that got reported... Was slightly more involved than UI message fixing though: RNA string length getter shall return exact lentgh of string (same as strlen), not size of allocated buffer to contain it! Otherwise, NULL final char leaks in and...
-rw-r--r--source/blender/makesrna/intern/rna_fluidsim.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_fluidsim.c b/source/blender/makesrna/intern/rna_fluidsim.c
index 091950a8e66..078b61ad7df 100644
--- a/source/blender/makesrna/intern/rna_fluidsim.c
+++ b/source/blender/makesrna/intern/rna_fluidsim.c
@@ -185,12 +185,15 @@ static void rna_DomainFluidSettings_memory_estimate_get(PointerRNA *ptr, char *v
#endif
}
-static int rna_DomainFluidSettings_memory_estimate_length(PointerRNA *UNUSED(ptr))
+static int rna_DomainFluidSettings_memory_estimate_length(PointerRNA *ptr)
{
#ifndef WITH_MOD_FLUID
return 0;
#else
- return 31;
+ char value[32];
+
+ rna_DomainFluidSettings_memory_estimate_get(ptr, value);
+ return strlen(value);
#endif
}