From ab4fd185843033cde0c58e8e0da932dbac7b8df2 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 2 Jun 2009 09:16:33 -0600 Subject: vbo: tweak out-of-bounds VBO access error message Subtract 1 from _MaxElement to be clearer. --- src/mesa/vbo/vbo_exec_array.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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; -- cgit v1.2.3