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)
committerAlan Hourihane <alanh@vmware.com>
Fri, 9 Jan 2009 11:16:40 +0000 (11:16 +0000)
src/mesa/shader/program.c

index 37962f0e9bb33717aef36c7ca48c23f38d5b198f..7a3b827352a8d1ce8a248c5bfce66135d9302a68 100644 (file)
@@ -570,7 +570,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;
          }
       }