From dbf9be88d983d18f4dff7135dcf62d3949e49e39 Mon Sep 17 00:00:00 2001 From: lawnjelly Date: Sun, 12 May 2024 15:05:46 +0100 Subject: [PATCH] Physics interpolation - Zero server side multimesh data To prevent possibility of use of uninitialized data. --- servers/rendering/rasterizer.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/servers/rendering/rasterizer.cpp b/servers/rendering/rasterizer.cpp index cc1bb5a76..6372d3c15 100644 --- a/servers/rendering/rasterizer.cpp +++ b/servers/rendering/rasterizer.cpp @@ -310,6 +310,10 @@ void RasterizerStorage::multimesh_allocate(RID p_multimesh, int p_instances, RS: mmi->_data_curr.resize(size_in_floats); mmi->_data_prev.resize(size_in_floats); mmi->_data_interpolated.resize(size_in_floats); + + mmi->_data_curr.fill(0); + mmi->_data_prev.fill(0); + mmi->_data_interpolated.fill(0); } return _multimesh_allocate(p_multimesh, p_instances, p_transform_format, p_color_format, p_data);