From: Ian Romanick <ian.d.roman...@intel.com> This is used everywhere else in this file because it avoids problems when count is zero (due to trimming).
Signed-off-by: Ian Romanick <ian.d.roman...@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=38109 Cc: Marius Predut <marius.pre...@intel.com> Cc: "10.6 11.0" <mesa-sta...@lists.freedesktop.org> --- src/mesa/tnl_dd/t_dd_dmatmp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/tnl_dd/t_dd_dmatmp.h b/src/mesa/tnl_dd/t_dd_dmatmp.h index 99a949f..ede16e1 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 */ -- 2.1.0 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev