From 1a084f1541b0c733a1a36d8a77772abaec4f3d40 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Tue, 31 May 2016 13:25:19 +0200 Subject: SCUMM HE: Initialize memory before usage --- engines/scumm/he/cup_player_he.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'engines') diff --git a/engines/scumm/he/cup_player_he.cpp b/engines/scumm/he/cup_player_he.cpp index c409863804..3a7ad49c2f 100644 --- a/engines/scumm/he/cup_player_he.cpp +++ b/engines/scumm/he/cup_player_he.cpp @@ -408,6 +408,9 @@ void CUP_Player::handleSRLE(Common::SeekableReadStream &dataStream, uint32 dataS static void decodeLZSS(uint8 *dst, const uint8 *src1, const uint8 *src2, const uint8 *src3) { uint8 wnd[4096]; int index = 1; + + memset(wnd, 0, sizeof(wnd)); + while (1) { int code = *src1++; for (int b = 0; b < 8; ++b) { -- cgit v1.2.3