shithub: cstory

Download patch

ref: cd276d94be13523c97054f3b7e4b438562ea9292
parent: 10d946aca25bc0db5f3d31544dc6b6a4d6085d0d
author: Clownacy <[email protected]>
date: Mon Jan 28 15:50:26 EST 2019

Fix possible bug in CortBox2

Cppcheck was complaining about duplicate conditions

--- a/src/Draw.cpp
+++ b/src/Draw.cpp
@@ -375,8 +375,8 @@
 	
 	SDL_SetRenderTarget(gRenderer, surf[surf_no].texture);
 	
-	const unsigned char col_red = col & 0xFF0000 >> 16;
-	const unsigned char col_green = col & 0x00FF00 >> 8;
+	const unsigned char col_red = (col & 0xFF0000) >> 16;
+	const unsigned char col_green = (col & 0x00FF00) >> 8;
 	const unsigned char col_blue = col & 0x0000FF;
 	const unsigned char col_alpha = (col_red || col_green || col_blue) ? 0xFF : 0;