mirror of
https://github.com/godotengine/godot.git
synced 2024-12-02 09:02:45 +00:00
Merge pull request #49585 from timothyqiu/oh-unsigned
Fix invalid read when using MultiMesh
This commit is contained in:
commit
0610c559ec
@ -3823,7 +3823,7 @@ void RendererStorageRD::_update_dirty_multimeshes() {
|
||||
|
||||
if (multimesh->data_cache_used_dirty_regions) {
|
||||
uint32_t data_cache_dirty_region_count = (multimesh->instances - 1) / MULTIMESH_DIRTY_REGION_SIZE + 1;
|
||||
uint32_t visible_region_count = (visible_instances - 1) / MULTIMESH_DIRTY_REGION_SIZE + 1;
|
||||
uint32_t visible_region_count = visible_instances == 0 ? 0 : (visible_instances - 1) / MULTIMESH_DIRTY_REGION_SIZE + 1;
|
||||
|
||||
uint32_t region_size = multimesh->stride_cache * MULTIMESH_DIRTY_REGION_SIZE * sizeof(float);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user