Commit 88a97daa authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

msrle32: Fix uses of arithmetic operators on Boolean types in…

msrle32: Fix uses of arithmetic operators on Boolean types in MSRLE32_CompressRLE4Line and MSRLE32_CompressRLE8Line. The "extra_byte" variable is used as though it contains an integer rather than a TRUE/FALSE value so make it into an integer.
parent 6181419b
......@@ -395,7 +395,7 @@ static INT MSRLE32_CompressRLE4Line(const CodecInfo *pi, const WORD *lpP,
INT i;
INT size = min(count, 254);
int bytes = ((size + 1) & (~1)) / 2;
BOOL extra_byte = bytes & 0x01;
int extra_byte = bytes & 0x01;
*lpSizeImage += 2 + bytes + extra_byte;
assert(((*lpSizeImage) % 2) == 0);
......@@ -488,7 +488,7 @@ static INT MSRLE32_CompressRLE8Line(const CodecInfo *pi, const WORD *lpP,
while (count > 2) {
INT i;
INT size = min(count, 255);
BOOL extra_byte = size % 2;
int extra_byte = size % 2;
*lpSizeImage += 2 + size + extra_byte;
count -= size;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment