diff options
Diffstat (limited to 'graphics/imagedec.cpp')
| -rw-r--r-- | graphics/imagedec.cpp | 6 | 
1 files changed, 2 insertions, 4 deletions
diff --git a/graphics/imagedec.cpp b/graphics/imagedec.cpp index a4d2fbc1cf..eb595a750e 100644 --- a/graphics/imagedec.cpp +++ b/graphics/imagedec.cpp @@ -17,12 +17,10 @@   * You should have received a copy of the GNU General Public License   * along with this program; if not, write to the Free Software   * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - * - * $URL$ - * $Id$   */  #include "graphics/imagedec.h" +#include "graphics/pixelformat.h"  #include "graphics/surface.h"  #include "common/file.h" @@ -117,7 +115,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;  | 
