From d70fe3699d62ed7af2da06da90800a815f1275da Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Mon, 1 Nov 2021 09:49:29 -0700 Subject: [PATCH] switch to unsigned int which is more correct and more efficient As suggested by Maato, martinhath, dcousens, and drfuchs. Signed-off-by: Stephen Gutekanst --- src/x11_window.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/x11_window.c b/src/x11_window.c index be1fb502..1aa297f8 100644 --- a/src/x11_window.c +++ b/src/x11_window.c @@ -2115,10 +2115,10 @@ void _glfwSetWindowIconX11(_GLFWwindow* window, int count, const GLFWimage* imag for (int j = 0; j < images[i].width * images[i].height; j++) { - *target++ = (((long)images[i].pixels[j * 4 + 0]) << 16) | - (((long)images[i].pixels[j * 4 + 1]) << 8) | - (((long)images[i].pixels[j * 4 + 2]) << 0) | - (((long)images[i].pixels[j * 4 + 3]) << 24); + *target++ = (((unsigned int)images[i].pixels[j * 4 + 0]) << 16) | + (((unsigned int)images[i].pixels[j * 4 + 1]) << 8) | + (((unsigned int)images[i].pixels[j * 4 + 2]) << 0) | + (((unsigned int)images[i].pixels[j * 4 + 3]) << 24); } }