[Scummvm-cvs-logs] scummvm master -> e5189bad6790c8101e7287b5c2ae39add6c8e673

eriktorbjorn eriktorbjorn at telia.com
Thu Dec 31 11:00:48 CET 2015


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
e5189bad67 LAB: Initialise _displayBuffer to silence Valgrind warning


Commit: e5189bad6790c8101e7287b5c2ae39add6c8e673
    https://github.com/scummvm/scummvm/commit/e5189bad6790c8101e7287b5c2ae39add6c8e673
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2015-12-31T10:58:09+01:00

Commit Message:
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.

Changed paths:
    engines/lab/dispman.cpp



diff --git a/engines/lab/dispman.cpp b/engines/lab/dispman.cpp
index 289e668..17623d4 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) {






More information about the Scummvm-git-logs mailing list