summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-05-16 12:53:45 +0200
committerwm4 <wm4@nowhere>2016-05-16 12:53:45 +0200
commit51307e9f18f6eddf6efcc1f92591370f0f141e31 (patch)
treebd292d31c4857b9446010ce054dcfa946dfdb574 /video
parent70df6aa375b231dcbc53cdf1bb94ccf20d8ae647 (diff)
downloadmpv-51307e9f18f6eddf6efcc1f92591370f0f141e31.tar.bz2
mpv-51307e9f18f6eddf6efcc1f92591370f0f141e31.tar.xz
vo_opengl: remove possibly undefined behavior
Diffstat (limited to 'video')
-rw-r--r--video/out/opengl/video.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/video/out/opengl/video.c b/video/out/opengl/video.c
index f56cdcaff8..0198539e36 100644
--- a/video/out/opengl/video.c
+++ b/video/out/opengl/video.c
@@ -1633,7 +1633,9 @@ static float eval_szexpr(struct gl_video *p, struct img_tex tex,
}
// Pop the operands in reverse order
- float op2 = stack[--idx], op1 = stack[--idx], res = 0.0;
+ float op2 = stack[--idx];
+ float op1 = stack[--idx];
+ float res = 0.0;
switch (expr[i].val.op) {
case SZEXP_OP_ADD: res = op1 + op2; break;
case SZEXP_OP_SUB: res = op1 - op2; break;