summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--GLESv2/yagl_glsl_state.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/GLESv2/yagl_glsl_state.c b/GLESv2/yagl_glsl_state.c
index 2c53835..c6e9f48 100644
--- a/GLESv2/yagl_glsl_state.c
+++ b/GLESv2/yagl_glsl_state.c
@@ -637,8 +637,8 @@ void yagl_glsl_state_pp_condition_parse_add_op(struct yagl_glsl_state *state, ya
}
// move higher or equal priority operations to expression stack
- while (glsl_pp_op_prio[op] <= glsl_pp_op_prio[state->pp_ops[state->pp_current_op - 1]] &&
- state->pp_current_op > 0) {
+ while (state->pp_current_op > 0 &&
+ glsl_pp_op_prio[op] <= glsl_pp_op_prio[state->pp_ops[state->pp_current_op - 1]]) {
assert(state->pp_current_expr < YAGL_GLSL_PP_EXPRESSION_STACK_SIZE);
state->pp_current_op--;
state->pp_exprs[state->pp_current_expr].op = state->pp_ops[state->pp_current_op];