From 7d238d877970ad906997d2cb36235c65dc38b1db Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Sat, 25 Jul 2009 17:48:51 +0000 Subject: Make sure that "buf" is properly terminated. Actually, we could probably get rid of "buf" completely, and replace it with face = syncChar[p] - '0', assuming that syncChar only contains digits. But for now, let's make a minimal change. This might fix bug #2826611 ("DRASCULA: Crash when smashing church window"). svn-id: r42776 --- engines/drascula/talk.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'engines') diff --git a/engines/drascula/talk.cpp b/engines/drascula/talk.cpp index 7c94938c9b..4b649ce8db 100644 --- a/engines/drascula/talk.cpp +++ b/engines/drascula/talk.cpp @@ -803,6 +803,7 @@ void DrasculaEngine::talk_sync(const char *said, const char *filename, const cha p = 0; + memset(buf, 0, sizeof(buf)); talkInit(filename); do { -- cgit v1.2.3