diff options
author | Brian Paul <[email protected]> | 2000-02-21 23:00:51 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2000-02-21 23:00:51 +0000 |
commit | 34c6d687ca49c997390ffbdee50a83495444e5bf (patch) | |
tree | b4afecade4f5e580ae6ab89762b57e723687cc00 /src/mesa/main/matrix.c | |
parent | df6a28d105a31cfdc3c7d52574ef81f9d31bd3bd (diff) |
fixed off by one error in matrix stack depths (Eero Pajarre)
Diffstat (limited to 'src/mesa/main/matrix.c')
-rw-r--r-- | src/mesa/main/matrix.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/main/matrix.c b/src/mesa/main/matrix.c index 278584076b0..f340b1ecd1d 100644 --- a/src/mesa/main/matrix.c +++ b/src/mesa/main/matrix.c @@ -1,4 +1,4 @@ -/* $Id: matrix.c,v 1.14 2000/02/02 19:28:27 brianp Exp $ */ +/* $Id: matrix.c,v 1.15 2000/02/21 23:00:51 brianp Exp $ */ /* * Mesa 3-D graphics library @@ -1058,7 +1058,7 @@ _mesa_PushMatrix( void ) switch (ctx->Transform.MatrixMode) { case GL_MODELVIEW: - if (ctx->ModelViewStackDepth>=MAX_MODELVIEW_STACK_DEPTH-1) { + if (ctx->ModelViewStackDepth >= MAX_MODELVIEW_STACK_DEPTH - 1) { gl_error( ctx, GL_STACK_OVERFLOW, "glPushMatrix"); return; } @@ -1066,7 +1066,7 @@ _mesa_PushMatrix( void ) &ctx->ModelView ); break; case GL_PROJECTION: - if (ctx->ProjectionStackDepth>=MAX_PROJECTION_STACK_DEPTH) { + if (ctx->ProjectionStackDepth >= MAX_PROJECTION_STACK_DEPTH - 1) { gl_error( ctx, GL_STACK_OVERFLOW, "glPushMatrix"); return; } @@ -1082,7 +1082,7 @@ _mesa_PushMatrix( void ) case GL_TEXTURE: { GLuint t = ctx->Texture.CurrentTransformUnit; - if (ctx->TextureStackDepth[t] >= MAX_TEXTURE_STACK_DEPTH) { + if (ctx->TextureStackDepth[t] >= MAX_TEXTURE_STACK_DEPTH - 1) { gl_error( ctx, GL_STACK_OVERFLOW, "glPushMatrix"); return; } |