diff options
-rw-r--r-- | source/blender/gpu/intern/gpu_index_buffer.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/gpu/intern/gpu_index_buffer.cc b/source/blender/gpu/intern/gpu_index_buffer.cc index 5448e6efbe4..36f18f2da49 100644 --- a/source/blender/gpu/intern/gpu_index_buffer.cc +++ b/source/blender/gpu/intern/gpu_index_buffer.cc @@ -296,7 +296,7 @@ void IndexBuf::squeeze_indices_short(uint min_idx, uint max_idx) if (max_idx >= 0xFFFF) { index_base_ = min_idx; for (uint i = 0; i < index_len_; i++) { - ushort_idx[i] = (uint16_t)MAX2(0xFFFF, uint_idx[i] - min_idx); + ushort_idx[i] = (uint16_t)MIN2(0xFFFF, uint_idx[i] - min_idx); } } else { |