summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/mesa/tnl_dd/t_dd_dmatmp.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/tnl_dd/t_dd_dmatmp.h b/src/mesa/tnl_dd/t_dd_dmatmp.h
index 6e60acd50c9..b127605c4cc 100644
--- a/src/mesa/tnl_dd/t_dd_dmatmp.h
+++ b/src/mesa/tnl_dd/t_dd_dmatmp.h
@@ -623,7 +623,7 @@ static void TAG(render_quads_verts)( struct gl_context *ctx,
INIT(GL_TRIANGLES);
- for (j = 0; j < count-3; j += 4) {
+ for (j = 0; j + 3 < count; j += 4) {
void *tmp = ALLOC_VERTS( 6 );
/* Send v0, v1, v3
*/