mesa: fix off-by-one bug in _mesa_delete_instructions()
authorBrian Paul <brianp@vmware.com>
Wed, 7 Jan 2009 19:31:14 +0000 (12:31 -0700)
committerBrian Paul <brianp@vmware.com>
Thu, 8 Jan 2009 22:35:23 +0000 (15:35 -0700)
src/mesa/shader/program.c

index 738891a0293441f5636151668e74947e6171f9a8..d114828ec6a2fec4fef53f3e8f573b346c1d8a19 100644 (file)
@@ -571,7 +571,7 @@ _mesa_delete_instructions(struct gl_program *prog, GLuint start, GLuint count)
    for (i = 0; i < prog->NumInstructions; i++) {
       struct prog_instruction *inst = prog->Instructions + i;
       if (inst->BranchTarget > 0) {
-         if (inst->BranchTarget >= start) {
+         if (inst->BranchTarget > start) {
             inst->BranchTarget -= count;
          }
       }