From: Brian Date: Tue, 27 Mar 2007 21:21:35 +0000 (-0600) Subject: fix another pc off-by one X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=31dc7a3c890a831f9a0d20dc394ddbe854a05718;p=mesa.git fix another pc off-by one --- 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: