summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSam Lantinga <slouken@libsdl.org>2013-07-27 03:22:37 -0700
committerSam Lantinga <slouken@libsdl.org>2013-07-27 03:22:37 -0700
commit1e7eb916c9ff7d31856545c51f3569c7ee8d3101 (patch)
tree5db03165914474821401dd3aca5cc578c3641283 /src
parentddb703566ebee9f49af35724b1c5bda8fcb01abd (diff)
Fixed variable scoping for Windows build
Diffstat (limited to 'src')
-rw-r--r--src/video/windows/SDL_windowswindow.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/video/windows/SDL_windowswindow.c b/src/video/windows/SDL_windowswindow.c
index e89f3f60d7..f40323ea6c 100644
--- a/src/video/windows/SDL_windowswindow.c
+++ b/src/video/windows/SDL_windowswindow.c
@@ -291,7 +291,7 @@ WIN_SetWindowIcon(_THIS, SDL_Window * window, SDL_Surface * icon)
HWND hwnd = ((SDL_WindowData *) window->driverdata)->hwnd;
HICON hicon = NULL;
BYTE *icon_bmp;
- int icon_len;
+ int icon_len, y;
SDL_RWops *dst;
/* Create temporary bitmap buffer */
@@ -318,7 +318,7 @@ WIN_SetWindowIcon(_THIS, SDL_Window * window, SDL_Surface * icon)
/* Write the pixels upside down into the bitmap buffer */
SDL_assert(icon->format->format == SDL_PIXELFORMAT_ARGB8888);
- int y = icon->h;
+ y = icon->h;
while (y--) {
Uint8 *src = (Uint8 *) icon->pixels + y * icon->pitch;
SDL_RWwrite(dst, src, icon->pitch, 1);