]> git.sesse.net Git - movit/commitdiff
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 580989e5f7bdac06198ba162a9b97a16609fbb0a..9a9a3eac7b7df1c380d28879ac4b12401abb4615 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);
        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);
                unsigned char r, g, b;
                unsigned int temp;
                unsigned int pixel = *(unsigned int *)(src_pixels + i * fmt->BytesPerPixel);