aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorTorbjörn Andersson2015-12-31 10:58:09 +0100
committerTorbjörn Andersson2015-12-31 10:58:09 +0100
commite5189bad6790c8101e7287b5c2ae39add6c8e673 (patch)
tree18ab79a07d363ea9d8f6b52eca11a76d84a82637 /engines
parentaafaae72cafcb627ac71b0e948b0bf1f8022bed4 (diff)
downloadscummvm-rg350-e5189bad6790c8101e7287b5c2ae39add6c8e673.tar.gz
scummvm-rg350-e5189bad6790c8101e7287b5c2ae39add6c8e673.tar.bz2
scummvm-rg350-e5189bad6790c8101e7287b5c2ae39add6c8e673.zip
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.
Diffstat (limited to 'engines')
-rw-r--r--engines/lab/dispman.cpp1
1 files changed, 1 insertions, 0 deletions
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) {