From 1ab5a4734706477b572dadc04c43c8d62f772cb6 Mon Sep 17 00:00:00 2001 From: thimenesup Date: Sat, 13 Apr 2024 14:53:19 +0200 Subject: [PATCH] Fix incorrect bounds check in rendering device push constant --- servers/rendering/rendering_device.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/servers/rendering/rendering_device.cpp b/servers/rendering/rendering_device.cpp index 2b6644e8934..82e0737ecf5 100644 --- a/servers/rendering/rendering_device.cpp +++ b/servers/rendering/rendering_device.cpp @@ -6400,11 +6400,11 @@ Vector RenderingDevice::_draw_list_switch_to_next_pass_split(uint32_t p #endif void RenderingDevice::_draw_list_set_push_constant(DrawListID p_list, const Vector &p_data, uint32_t p_data_size) { - ERR_FAIL_COND((uint32_t)p_data.size() > p_data_size); + ERR_FAIL_COND(p_data_size > (uint32_t)p_data.size()); draw_list_set_push_constant(p_list, p_data.ptr(), p_data_size); } void RenderingDevice::_compute_list_set_push_constant(ComputeListID p_list, const Vector &p_data, uint32_t p_data_size) { - ERR_FAIL_COND((uint32_t)p_data.size() > p_data_size); + ERR_FAIL_COND(p_data_size > (uint32_t)p_data.size()); compute_list_set_push_constant(p_list, p_data.ptr(), p_data_size); }