From 884a3852873f392c1678a1142005da69d0e4cb32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Tue, 17 Sep 2019 16:18:08 +0200 Subject: GPU: Fix broken assert --- source/blender/gpu/intern/gpu_batch.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/blender/gpu/intern/gpu_batch.c b/source/blender/gpu/intern/gpu_batch.c index e0d77f37512..bc750fb74c9 100644 --- a/source/blender/gpu/intern/gpu_batch.c +++ b/source/blender/gpu/intern/gpu_batch.c @@ -676,9 +676,9 @@ void GPU_batch_draw_advanced(GPUBatch *batch, int v_first, int v_count, int i_fi } /* Verify there is enough data do draw. */ - BLI_assert(i_first + i_count <= batch->inst ? batch->inst->vertex_len : 1); - BLI_assert(v_first + v_count <= batch->elem ? batch->elem->index_len : - batch->verts[0]->vertex_len); + BLI_assert(i_first + i_count <= (batch->inst ? batch->inst->vertex_len : INT_MAX)); + BLI_assert(v_first + v_count <= + (batch->elem ? batch->elem->index_len : batch->verts[0]->vertex_len)); if (!GPU_arb_base_instance_is_supported()) { if (i_first > 0) { -- cgit v1.2.3