From: Brian Paul Date: Tue, 2 Jun 2009 15:16:33 +0000 (-0600) Subject: vbo: tweak out-of-bounds VBO access error message X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ab4fd185843033cde0c58e8e0da932dbac7b8df2;p=mesa.git vbo: tweak out-of-bounds VBO access error message Subtract 1 from _MaxElement to be clearer. --- diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c index 2815ba3cc92..cd0397ab4c8 100644 --- a/src/mesa/vbo/vbo_exec_array.c +++ b/src/mesa/vbo/vbo_exec_array.c @@ -366,7 +366,7 @@ vbo_exec_DrawRangeElements(GLenum mode, _mesa_warning(ctx, "glDraw[Range]Elements(start %u, end %u, count %d, " "type 0x%x) index=%u is out of bounds (max=%u)", start, end, count, type, end, - ctx->Array.ArrayObj->_MaxElement); + ctx->Array.ArrayObj->_MaxElement - 1); if (0) _mesa_print_arrays(ctx); return;