From 2def6f5568ee76a56a139799116c67cdcfc19814 Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Mon, 29 Jun 2020 11:17:25 +0200 Subject: [PATCH] Fix T78415: Particle Edit mode Add brush with a radius > 181px crashes Caused by short overflow, change to int instead. Maniphest Tasks: T78415 Differential Revision: https://developer.blender.org/D8148 --- source/blender/editors/physics/particle_edit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c index ef5ed806c1e..457c8ba30e6 100644 --- a/source/blender/editors/physics/particle_edit.c +++ b/source/blender/editors/physics/particle_edit.c @@ -4103,7 +4103,7 @@ static void brush_add_count_iter(void *__restrict iter_data_v, BrushAddCountIterTLSData *tls = tls_v->userdata_chunk; const int number = iter_data->number; const short size = iter_data->size; - const short size2 = size * size; + const int size2 = size * size; float dmx, dmy; if (number > 1) { dmx = size;