From 9b53cd51fdf193c8748909479ec6c356fa7a1731 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Sun, 3 Jun 2007 16:13:20 +0000 Subject: Fixed image loading in software mode to not assume all images are 32-bit. --- src/resources/image.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/resources/image.cpp') diff --git a/src/resources/image.cpp b/src/resources/image.cpp index e2220088..393c443c 100644 --- a/src/resources/image.cpp +++ b/src/resources/image.cpp @@ -192,7 +192,7 @@ Image* Image::load(void *buffer, unsigned int bufferSize, { Uint8 r, g, b, a; SDL_GetRGBA( - ((Uint32*) tmpImage->pixels)[i], + ((char*) tmpImage->pixels)[i * tmpImage->format->BitsPerPixel], tmpImage->format, &r, &g, &b, &a); -- cgit v1.2.3-70-g09d2