diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-10-05 08:31:49 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-10-05 08:31:49 +0200 |
commit | 7af09c27f8bbf2e799723c28e07ab2677dc50cd9 (patch) | |
tree | 34575adc2a15b11c52a309ff49aa925876966313 /servers | |
parent | 58a112183c2b509c386b1aa9576b9e18712acb6a (diff) | |
parent | 909c905d28398164a637810a62a86d59def0f18c (diff) |
Merge pull request #66915 from timothyqiu/indexing
Fix crash when executing `RenderingServer.mesh_surface_get_format_offset`
Diffstat (limited to 'servers')
-rw-r--r-- | servers/rendering_server.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/servers/rendering_server.cpp b/servers/rendering_server.cpp index 57378708ba..750121719f 100644 --- a/servers/rendering_server.cpp +++ b/servers/rendering_server.cpp @@ -701,6 +701,7 @@ Error RenderingServer::_surface_set_data(Array p_arrays, uint32_t p_format, uint } uint32_t RenderingServer::mesh_surface_get_format_offset(uint32_t p_format, int p_vertex_len, int p_array_index) const { + ERR_FAIL_INDEX_V(p_array_index, ARRAY_MAX, 0); p_format &= ~ARRAY_FORMAT_INDEX; uint32_t offsets[ARRAY_MAX]; uint32_t vstr; |