From e5189bad6790c8101e7287b5c2ae39add6c8e673 Mon Sep 17 00:00:00 2001 From: Torbjörn Andersson Date: Thu, 31 Dec 2015 10:58:09 +0100 Subject: LAB: Initialise _displayBuffer to silence Valgrind warning Otherwise, its contents will be undefined on the first screen update. That could probably be fixed by introducing some sort of "dirty rect" mechanism, but I don't think it's a bad idea to initialise it regardless. --- engines/lab/dispman.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'engines') diff --git a/engines/lab/dispman.cpp b/engines/lab/dispman.cpp index 289e66894f..17623d4f08 100644 --- a/engines/lab/dispman.cpp +++ b/engines/lab/dispman.cpp @@ -422,6 +422,7 @@ void DisplayMan::createScreen(bool hiRes) { if (_displayBuffer) delete[] _displayBuffer; _displayBuffer = new byte[_screenBytesPerPage]; + memset(_displayBuffer, 0, _screenBytesPerPage); } void DisplayMan::setAmigaPal(uint16 *pal) { -- cgit v1.2.3