Fixed variable scoping for Windows build
authorSam Lantinga <slouken@libsdl.org>
Sat, 27 Jul 2013 03:22:37 -0700
changeset 7527 7e254bcd3b9d
parent 7526 6c0f0280149c
child 7528 1890a896802f
Fixed variable scoping for Windows build
src/video/windows/SDL_windowswindow.c
--- a/src/video/windows/SDL_windowswindow.c	Sat Jul 27 03:20:09 2013 -0700
+++ b/src/video/windows/SDL_windowswindow.c	Sat Jul 27 03:22:37 2013 -0700
@@ -291,7 +291,7 @@
     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 @@
 
     /* 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);