diff options
Diffstat (limited to 'backends/platform')
| -rw-r--r-- | backends/platform/sdl/graphics.cpp | 6 | 
1 files changed, 4 insertions, 2 deletions
| diff --git a/backends/platform/sdl/graphics.cpp b/backends/platform/sdl/graphics.cpp index e02e2f0d1d..ce3647d6fb 100644 --- a/backends/platform/sdl/graphics.cpp +++ b/backends/platform/sdl/graphics.cpp @@ -1490,9 +1490,11 @@ void OSystem_SDL::setMouseCursor(const byte *buf, uint w, uint h, int hotspot_x,  		_cursorFormat = Graphics::PixelFormat::createFormatCLUT8();  	else if (format->bytesPerPixel <= _screenFormat.bytesPerPixel)  		_cursorFormat = *format; -	keycolor &= (1 << (_cursorFormat.bytesPerPixel << 3)) - 1; + +	if (_cursorFormat.bytesPerPixel < 4) +		assert(keycolor < (uint)(1 << (_cursorFormat.bytesPerPixel << 3)));  #else -	keycolor &= 0xFF; +	assert(keycolor <= 0xFF);  #endif  	if (w == 0 || h == 0) | 
