diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2017-05-30 10:46:53 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2017-05-30 10:46:53 +0300 |
commit | 76c97aaff94c199573463256a2ed7ff8d3d56dde (patch) | |
tree | f29e77fb2b1142ba5aefd433e4390cf6ad947d5c /source/blender/makesrna | |
parent | 9b914764a9f9b9c02986448876af85aa6e687516 (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...
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_fluidsim.c | 7 |
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 } |