aboutsummaryrefslogtreecommitdiff
path: root/engines/sword1
diff options
context:
space:
mode:
authorFabio Battaglia2009-03-17 09:21:14 +0000
committerFabio Battaglia2009-03-17 09:21:14 +0000
commit81cfb9ffd560e65e1befb6729f69154a1ceef875 (patch)
treee2006e803a00d4b7b5d9378d059413d6d82ce5d5 /engines/sword1
parentf7e4f1521868d09c2f992523453dcc05fa3b50cf (diff)
downloadscummvm-rg350-81cfb9ffd560e65e1befb6729f69154a1ceef875.tar.gz
scummvm-rg350-81cfb9ffd560e65e1befb6729f69154a1ceef875.tar.bz2
scummvm-rg350-81cfb9ffd560e65e1befb6729f69154a1ceef875.zip
sword1: clean background buffers before writing on them in psx decoding functions
svn-id: r39480
Diffstat (limited to 'engines/sword1')
-rw-r--r--engines/sword1/screen.cpp2
1 files changed, 2 insertions, 0 deletions
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'));