From 76c97aaff94c199573463256a2ed7ff8d3d56dde Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Tue, 30 May 2017 09:46:53 +0200 Subject: 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... --- source/blender/makesrna/intern/rna_fluidsim.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'source/blender/makesrna') 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 } -- cgit v1.2.3