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...
This commit is contained in:
parent
9b914764a9
commit
76c97aaff9
Notes:
blender-bot
2023-06-26 11:58:59 +02:00
Referenced by issue #50775, Missing parenthesis on fluid bake button
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue