summaryrefslogtreecommitdiffstats
path: root/src/mesa/shader/prog_optimize.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/shader/prog_optimize.c')
-rw-r--r--src/mesa/shader/prog_optimize.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/shader/prog_optimize.c b/src/mesa/shader/prog_optimize.c
index 4fe351251e8..8b9466a5a61 100644
--- a/src/mesa/shader/prog_optimize.c
+++ b/src/mesa/shader/prog_optimize.c
@@ -578,7 +578,7 @@ _mesa_remove_extra_moves(struct gl_program *prog)
/* get pointer to previous instruction */
prevI = i - 1;
- while (removeInst[prevI] && prevI > 0)
+ while (prevI > 0 && removeInst[prevI])
prevI--;
prevInst = prog->Instructions + prevI;