Mesa (master): mesa: fix off-by-one bug in _mesa_delete_instructions()
Brian Paul
brianp at kemper.freedesktop.org
Thu Jan 8 22:37:23 UTC 2009
Module: Mesa
Branch: master
Commit: 19c877c3278f5bfc48f55b2ee35ec5f6769e4c90
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=19c877c3278f5bfc48f55b2ee35ec5f6769e4c90
Author: Brian Paul <brianp at vmware.com>
Date: Wed Jan 7 12:31:14 2009 -0700
mesa: fix off-by-one bug in _mesa_delete_instructions()
---
src/mesa/shader/program.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/mesa/shader/program.c b/src/mesa/shader/program.c
index 738891a..d114828 100644
--- a/src/mesa/shader/program.c
+++ b/src/mesa/shader/program.c
@@ -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;
}
}
More information about the mesa-commit
mailing list