summaryrefslogtreecommitdiff
path: root/src/resources/image.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/resources/image.cpp')
-rw-r--r--src/resources/image.cpp2
1 files changed, 1 insertions, 1 deletions
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);