From 28279c0686ef129444de39cf968a7f7cab4a4724 Mon Sep 17 00:00:00 2001 From: kimci86 Date: Tue, 12 Apr 2022 15:46:19 +0200 Subject: [PATCH] Fix incorrect cast in Cursor::loadFromPixels Unix implementation --- src/SFML/Window/Unix/CursorImpl.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/SFML/Window/Unix/CursorImpl.cpp b/src/SFML/Window/Unix/CursorImpl.cpp index d0d51300d..f2cfdf802 100644 --- a/src/SFML/Window/Unix/CursorImpl.cpp +++ b/src/SFML/Window/Unix/CursorImpl.cpp @@ -80,10 +80,10 @@ bool CursorImpl::loadFromPixelsARGB(const Uint8* pixels, Vector2u size, Vector2u const std::size_t numPixels = size.x * size.y; for (std::size_t pixelIndex = 0; pixelIndex < numPixels; ++pixelIndex) { - cursorImage->pixels[pixelIndex] = static_cast(pixels[pixelIndex * 4 + 2] + - (pixels[pixelIndex * 4 + 1] << 8) + - (pixels[pixelIndex * 4 + 0] << 16) + - (pixels[pixelIndex * 4 + 3] << 24)); + cursorImage->pixels[pixelIndex] = static_cast(pixels[pixelIndex * 4 + 2] + + (pixels[pixelIndex * 4 + 1] << 8) + + (pixels[pixelIndex * 4 + 0] << 16) + + (pixels[pixelIndex * 4 + 3] << 24)); } // Create the cursor.