From 4b69ed4124c2ba0d0f81dff5c586ad51ef23f92b Mon Sep 17 00:00:00 2001 From: karroffel Date: Tue, 10 Jul 2018 23:13:59 +0200 Subject: [PATCH] fix wrong loop condition in MultiMesh allocation (cherry picked from commit 3d33da19bd1cd5a0d2569432a356074702095508) --- drivers/gles3/rasterizer_storage_gles3.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gles3/rasterizer_storage_gles3.cpp b/drivers/gles3/rasterizer_storage_gles3.cpp index a28dac275ff..a653b821bb3 100644 --- a/drivers/gles3/rasterizer_storage_gles3.cpp +++ b/drivers/gles3/rasterizer_storage_gles3.cpp @@ -3799,7 +3799,8 @@ void RasterizerStorageGLES3::multimesh_allocate(RID p_multimesh, int p_instances int format_floats = multimesh->color_floats + multimesh->xform_floats; multimesh->data.resize(format_floats * p_instances); - for (int i = 0; i < p_instances; i += format_floats) { + + for (int i = 0; i < p_instances * format_floats; i += format_floats) { int color_from = 0;