From 31dc7a3c890a831f9a0d20dc394ddbe854a05718 Mon Sep 17 00:00:00 2001 From: Brian Date: Tue, 27 Mar 2007 15:21:35 -0600 Subject: [PATCH] fix another pc off-by one --- src/mesa/shader/prog_execute.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mesa/shader/prog_execute.c b/src/mesa/shader/prog_execute.c index 37240820e79..0438d6a7b99 100644 --- a/src/mesa/shader/prog_execute.c +++ b/src/mesa/shader/prog_execute.c @@ -753,7 +753,8 @@ _mesa_execute_program(GLcontext * ctx, return GL_TRUE; /* Per GL_NV_vertex_program2 spec */ } machine->CallStack[machine->StackDepth++] = pc + 1; /* next inst */ - pc = inst->BranchTarget; + /* Subtract 1 here since we'll do pc++ at end of for-loop */ + pc = inst->BranchTarget - 1; } break; case OPCODE_CMP: -- 2.30.2