From 81cfb9ffd560e65e1befb6729f69154a1ceef875 Mon Sep 17 00:00:00 2001 From: Fabio Battaglia Date: Tue, 17 Mar 2009 09:21:14 +0000 Subject: sword1: clean background buffers before writing on them in psx decoding functions svn-id: r39480 --- engines/sword1/screen.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'engines') diff --git a/engines/sword1/screen.cpp b/engines/sword1/screen.cpp index daa9b60190..700d6e638a 100644 --- a/engines/sword1/screen.cpp +++ b/engines/sword1/screen.cpp @@ -858,6 +858,7 @@ uint8* Screen::psxBackgroundToIndexed(uint8 *psxBackground, uint32 bakXres, uint uint8 *decomp_tile = (uint8 *)malloc(16 * 16); //Tiles are always 16 * 16 uint8 *fullres_buffer = (uint8 *)malloc(bakXres * yresInTiles * 32); + memset(fullres_buffer, 0, bakXres * yresInTiles * 32); bool isCompressed = (tag == 0x434F4D50); @@ -899,6 +900,7 @@ uint8* Screen::psxShrinkedBackgroundToIndexed(uint8 *psxBackground, uint32 bakXr uint8 *decomp_tile = (uint8 *)malloc(16 * 16); //Tiles are always 16 * 16 uint8 *fullres_buffer = (uint8 *)malloc(bakXres * (yresInTiles + 1) * 32); + memset(fullres_buffer, 0, bakXres * (yresInTiles + 1) * 32); bool isCompressed = (READ_LE_UINT32(psxBackground) == MKID_BE('COMP')); -- cgit v1.2.3