From d2338f3a497e6b4d20328aa4e4833844f1e30af7 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Fri, 11 Mar 2016 11:45:53 +0100 Subject: [PATCH] Fix X11 icon image copy --- src/x11_window.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/x11_window.c b/src/x11_window.c index e198b815..8fc8e2cd 100644 --- a/src/x11_window.c +++ b/src/x11_window.c @@ -1554,12 +1554,12 @@ void _glfwPlatformSetWindowIcon(_GLFWwindow* window, *target++ = images[i].width; *target++ = images[i].height; - for (j = 0; j < images[i].width * images[i].height; i++) + for (j = 0; j < images[i].width * images[i].height; j++) { - *target++ = (images[i].pixels[i * 4 + 0] << 16) | - (images[i].pixels[i * 4 + 1] << 8) | - (images[i].pixels[i * 4 + 2] << 0) | - (images[i].pixels[i * 4 + 3] << 24); + *target++ = (images[i].pixels[j * 4 + 0] << 16) | + (images[i].pixels[j * 4 + 1] << 8) | + (images[i].pixels[j * 4 + 2] << 0) | + (images[i].pixels[j * 4 + 3] << 24); } }