Mesa (master): vbo: tweak out-of-bounds VBO access error message

Brian Paul brianp at kemper.freedesktop.org
Wed Jun 3 16:18:43 PDT 2009


Module: Mesa
Branch: master
Commit: ab4fd185843033cde0c58e8e0da932dbac7b8df2
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ab4fd185843033cde0c58e8e0da932dbac7b8df2

Author: Brian Paul <brianp at vmware.com>
Date:   Tue Jun  2 09:16:33 2009 -0600

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 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c
index 2815ba3..cd0397a 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;



More information about the mesa-commit mailing list