mesa: fix off-by-one bug in _mesa_delete_instructions()
This commit is contained in:

committed by
Alan Hourihane

parent
28c503d4bb
commit
5273a5f0d7
@@ -570,7 +570,7 @@ _mesa_delete_instructions(struct gl_program *prog, GLuint start, GLuint count)
|
|||||||
for (i = 0; i < prog->NumInstructions; i++) {
|
for (i = 0; i < prog->NumInstructions; i++) {
|
||||||
struct prog_instruction *inst = prog->Instructions + i;
|
struct prog_instruction *inst = prog->Instructions + i;
|
||||||
if (inst->BranchTarget > 0) {
|
if (inst->BranchTarget > 0) {
|
||||||
if (inst->BranchTarget >= start) {
|
if (inst->BranchTarget > start) {
|
||||||
inst->BranchTarget -= count;
|
inst->BranchTarget -= count;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user