fix another pc off-by one
authorBrian <brian@yutani.localnet.net>
Tue, 27 Mar 2007 21:21:35 +0000 (15:21 -0600)
committerBrian <brian@yutani.localnet.net>
Tue, 27 Mar 2007 22:06:47 +0000 (16:06 -0600)
src/mesa/shader/prog_execute.c

index 37240820e79790d65aea63c6583c80a0f2f4779e..0438d6a7b9907c7ae7ddb2838ab4d0b93d9d283f 100644 (file)
@@ -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: