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 738891a..d114828 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;
          }
       }