[Scummvm-cvs-logs] scummvm master -> 8430c491f0dcb8693262d49add71466a45fe37cf

somaen einarjohants at gmail.com
Wed Apr 17 15:37:38 CEST 2013


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

Summary:
c64386fe88 WINTERMUTE: Initialize _gameDescription in default-constructor.
4ab80160da WINTERMUTE: Add a sanity check for _game.
8430c491f0 WINTERMUTE: Replace strcpy by strlcpy in BaseFileManager


Commit: c64386fe8813d46a8335ca59e2bd6c461b0d5331
    https://github.com/scummvm/scummvm/commit/c64386fe8813d46a8335ca59e2bd6c461b0d5331
Author: Einar Johan Trøan Sømåen (einarjohants at gmail.com)
Date: 2013-04-17T06:17:56-07:00

Commit Message:
WINTERMUTE: Initialize _gameDescription in default-constructor.

Changed paths:
    engines/wintermute/wintermute.cpp



diff --git a/engines/wintermute/wintermute.cpp b/engines/wintermute/wintermute.cpp
index ad26c42..4e66150 100644
--- a/engines/wintermute/wintermute.cpp
+++ b/engines/wintermute/wintermute.cpp
@@ -51,6 +51,7 @@ WintermuteEngine::WintermuteEngine() : Engine(g_system) {
 	_game = new AdGame("");
 	_debugger = nullptr;
 	_trigDebug = false;
+	_gameDescription = nullptr;
 }
 
 WintermuteEngine::WintermuteEngine(OSystem *syst, const ADGameDescription *desc)


Commit: 4ab80160da661a9dd5aca068c813014133b62920
    https://github.com/scummvm/scummvm/commit/4ab80160da661a9dd5aca068c813014133b62920
Author: Einar Johan Trøan Sømåen (einarjohants at gmail.com)
Date: 2013-04-17T06:25:10-07:00

Commit Message:
WINTERMUTE: Add a sanity check for _game.

Changed paths:
    engines/wintermute/wintermute.cpp



diff --git a/engines/wintermute/wintermute.cpp b/engines/wintermute/wintermute.cpp
index 4e66150..b17ad99 100644
--- a/engines/wintermute/wintermute.cpp
+++ b/engines/wintermute/wintermute.cpp
@@ -239,6 +239,9 @@ int WintermuteEngine::messageLoop() {
 	const uint32 maxFPS = 60;
 	const uint32 frameTime = 2 * (uint32)((1.0 / maxFPS) * 1000);
 	while (!done) {
+		if (!_game) {
+			break;
+		}
 		_debugger->onFrame();
 
 		Common::Event event;
@@ -272,7 +275,7 @@ int WintermuteEngine::messageLoop() {
 			}
 			prevTime = time;
 		}
-		if (_game->_quitting) {
+		if (_game && _game->_quitting) {
 			break;
 		}
 	}


Commit: 8430c491f0dcb8693262d49add71466a45fe37cf
    https://github.com/scummvm/scummvm/commit/8430c491f0dcb8693262d49add71466a45fe37cf
Author: Einar Johan Trøan Sømåen (einarjohants at gmail.com)
Date: 2013-04-17T06:35:09-07:00

Commit Message:
WINTERMUTE: Replace strcpy by strlcpy in BaseFileManager

Changed paths:
    engines/wintermute/base/base_file_manager.cpp



diff --git a/engines/wintermute/base/base_file_manager.cpp b/engines/wintermute/base/base_file_manager.cpp
index 28e0b3a..cc01806 100644
--- a/engines/wintermute/base/base_file_manager.cpp
+++ b/engines/wintermute/base/base_file_manager.cpp
@@ -249,7 +249,7 @@ Common::SeekableReadStream *BaseFileManager::openPkgFile(const Common::String &f
 	upcName.toUppercase();
 	Common::SeekableReadStream *file = nullptr;
 	char fileName[MAX_PATH_LENGTH];
-	strcpy(fileName, upcName.c_str());
+	Common::strlcpy(fileName, upcName.c_str(), MAX_PATH_LENGTH);
 
 	// correct slashes
 	for (uint32 i = 0; i < upcName.size(); i++) {






More information about the Scummvm-git-logs mailing list