From 1b44158f7581c22e832122e4fd1c2bfcb52573e6 Mon Sep 17 00:00:00 2001 From: zeromus Date: Wed, 24 Jun 2009 00:40:40 +0000 Subject: [PATCH] gfx3d: fix an ancient bug in matrix set position. fixes some mispositioned verts e.g. diddy kong racing --- desmume/src/matrix.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desmume/src/matrix.cpp b/desmume/src/matrix.cpp index d9c3bd780..b298cb4fe 100644 --- a/desmume/src/matrix.cpp +++ b/desmume/src/matrix.cpp @@ -195,7 +195,7 @@ void MatrixStackSetStackPosition (MatrixStack *stack, int pos) if (stack->position < 0) stack->position = 0; else if (stack->position > stack->size) - stack->position = stack->size; + stack->position = stack->size+1; } void MatrixStackPushMatrix (MatrixStack *stack, const float *ptr)