[Scummvm-git-logs] scummvm master -> f3418382cbbac419b18df5a660057a15a41fa14e

aquadran noreply at scummvm.org
Mon Sep 29 09:19:09 UTC 2025


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

Summary:
f3418382cb WINTERMUTE: Fixed conditions. Coverity: 1635164, 1635165, 1635168, 1635169


Commit: f3418382cbbac419b18df5a660057a15a41fa14e
    https://github.com/scummvm/scummvm/commit/f3418382cbbac419b18df5a660057a15a41fa14e
Author: Paweł Kołodziejski (aquadran at gmail.com)
Date: 2025-09-29T11:19:00+02:00

Commit Message:
WINTERMUTE: Fixed conditions. Coverity: 1635164, 1635165, 1635168, 1635169

Changed paths:
    engines/wintermute/ad/ad_game.cpp
    engines/wintermute/base/base_sub_frame.cpp


diff --git a/engines/wintermute/ad/ad_game.cpp b/engines/wintermute/ad/ad_game.cpp
index e2d581da6b7..d68abd83603 100644
--- a/engines/wintermute/ad/ad_game.cpp
+++ b/engines/wintermute/ad/ad_game.cpp
@@ -1113,7 +1113,7 @@ ScValue *AdGame::scGetProperty(const char *name) {
 	// StartupScene
 	//////////////////////////////////////////////////////////////////////////
 	else if (strcmp(name, "StartupScene") == 0) {
-		if (!_startupScene && !_startupScene[0]) {
+		if (!_startupScene || !_startupScene[0]) {
 			_scValue->setNULL();
 		} else {
 			_scValue->setString(_startupScene);
diff --git a/engines/wintermute/base/base_sub_frame.cpp b/engines/wintermute/base/base_sub_frame.cpp
index 9ac3c37ebdd..94cea4c55b8 100644
--- a/engines/wintermute/base/base_sub_frame.cpp
+++ b/engines/wintermute/base/base_sub_frame.cpp
@@ -415,7 +415,7 @@ bool BaseSubFrame::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisS
 	if (strcmp(name, "GetImage") == 0) {
 		stack->correctParams(0);
 
-		if (!_surfaceFilename && _surfaceFilename[0]) {
+		if (!_surfaceFilename || !_surfaceFilename[0]) {
 			stack->pushNULL();
 		} else {
 			stack->pushString(_surfaceFilename);
@@ -708,7 +708,7 @@ bool BaseSubFrame::setSurface(const char *filename, bool defaultCK, byte ckRed,
 
 //////////////////////////////////////////////////////////////////////////
 bool BaseSubFrame::setSurfaceSimple() {
-	if (!_surfaceFilename && _surfaceFilename[0]) {
+	if (!_surfaceFilename || !_surfaceFilename[0]) {
 		_surface = nullptr;
 		return STATUS_OK;
 	}




More information about the Scummvm-git-logs mailing list