From 1aba2d2695f9103454b05fb1c56775d55e36f24c Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Tue, 10 Apr 2012 15:05:13 +0200 Subject: [PATCH] fix operator precedence #95 This explains why our dimmed areas had vertical stripes and improves quality --- blitbuffer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/blitbuffer.c b/blitbuffer.c index 123b9cb55..13eb14a9e 100644 --- a/blitbuffer.c +++ b/blitbuffer.c @@ -463,8 +463,8 @@ static int dimRect(lua_State *L) { for(cy = 0; cy < h; cy++) { for(cx = 0; cx < w/2; cx++) { *(dstptr+cx) = - *(dstptr+cx) >> 1 & 0xF0 | - *(dstptr+cx) & 0x0F >> 1; + ( *(dstptr+cx) >> 1 ) & 0xF0 | + ( *(dstptr+cx) & 0x0F ) >> 1; } dstptr += dst->pitch; }