aboutsummaryrefslogtreecommitdiff
path: root/graphics/imagedec.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/imagedec.cpp')
-rw-r--r--graphics/imagedec.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/graphics/imagedec.cpp b/graphics/imagedec.cpp
index a4d2fbc1cf..b41eb59836 100644
--- a/graphics/imagedec.cpp
+++ b/graphics/imagedec.cpp
@@ -117,7 +117,7 @@ Surface *BMPDecoder::decodeImage(Common::SeekableReadStream &stream, const Pixel
uint8 r = 0, g = 0, b = 0;
Surface *newSurf = new Surface;
assert(newSurf);
- newSurf->create(info.width, info.height, sizeof(OverlayColor));
+ newSurf->create(info.width, info.height, format);
assert(newSurf->pixels);
OverlayColor *curPixel = (OverlayColor*)newSurf->pixels + (newSurf->h-1) * newSurf->w;
int pitchAdd = info.width % 4;