From a53e7c3074543fcbccb0e2be4d0121e3b7f9d1e1 Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Mon, 11 Nov 2013 01:12:42 -0600 Subject: [PATCH] Fix comparing unsigned values to < 0 in gl2 --- code/renderergl2/tr_bsp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/renderergl2/tr_bsp.c b/code/renderergl2/tr_bsp.c index 419ba055..28b99dd3 100644 --- a/code/renderergl2/tr_bsp.c +++ b/code/renderergl2/tr_bsp.c @@ -746,7 +746,7 @@ static void ParseFace( dsurface_t *ds, drawVert_t *verts, float *hdrVertColors, { tri[j] = LittleLong(indexes[i + j]); - if(tri[j] < 0 || tri[j] >= numVerts) + if(tri[j] >= numVerts) { ri.Error(ERR_DROP, "Bad index in face surface"); } @@ -990,7 +990,7 @@ static void ParseTriSurf( dsurface_t *ds, drawVert_t *verts, float *hdrVertColor { tri[j] = LittleLong(indexes[i + j]); - if(tri[j] < 0 || tri[j] >= numVerts) + if(tri[j] >= numVerts) { ri.Error(ERR_DROP, "Bad index in face surface"); }