Fix a warning.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 1 Oct 2012 22:46:21 +0000 (00:46 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 1 Oct 2012 22:46:21 +0000 (00:46 +0200)
main.cpp

index 580989e..9a9a3ea 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -92,7 +92,7 @@ unsigned char *load_image(const char *filename, unsigned *w, unsigned *h)
        SDL_LockSurface(img);
        unsigned char *src_pixels = (unsigned char *)img->pixels;
        unsigned char *dst_pixels = (unsigned char *)malloc(img->w * img->h * 3);
-       for (unsigned i = 0; i < img->w * img->h; ++i) {
+       for (int i = 0; i < img->w * img->h; ++i) {
                unsigned char r, g, b;
                unsigned int temp;
                unsigned int pixel = *(unsigned int *)(src_pixels + i * fmt->BytesPerPixel);