diff options
Diffstat (limited to 'base/commandLine.cpp')
| -rw-r--r-- | base/commandLine.cpp | 8 | 
1 files changed, 4 insertions, 4 deletions
| diff --git a/base/commandLine.cpp b/base/commandLine.cpp index c8ceea77af..bb7f93a274 100644 --- a/base/commandLine.cpp +++ b/base/commandLine.cpp @@ -804,7 +804,7 @@ static void listTargets() {  		// If there's no description, fallback on the default description.  		if (description.empty()) {  			QualifiedGameDescriptor g = EngineMan.findTarget(name); -			if (g.description) +			if (!g.description.empty())  				description = g.description;  		}  		// If there's still no description, we cannot come up with one. Insert some dummy text. @@ -854,7 +854,7 @@ static Common::Error listSaves(const Common::String &singleTarget) {  			currentTarget = *i;  			EngineMan.upgradeTargetIfNecessary(*i);  			game = EngineMan.findTarget(*i, &plugin); -		} else if (game = findGameMatchingName(*i), game.gameId) { +		} else if (game = findGameMatchingName(*i), !game.gameId.empty()) {  			// The name is a known game id  			plugin = EngineMan.findPlugin(game.engineId);  			currentTarget = createTemporaryTarget(game.engineId, game.gameId); @@ -1278,7 +1278,7 @@ bool processSettings(Common::String &command, Common::StringMap &settings, Commo  	QualifiedGameDescriptor gameOption;  	if (settings.contains("game")) {  		gameOption = findGameMatchingName(settings["game"]); -		if (!gameOption.gameId) { +		if (gameOption.gameId.empty()) {  			usage("Unrecognized game '%s'. Use the --list-games command for a list of accepted values.\n", settings["game"].c_str());  		}  	} @@ -1361,7 +1361,7 @@ bool processSettings(Common::String &command, Common::StringMap &settings, Commo  		if (ConfMan.hasGameDomain(command)) {  			// Command is a known target  			ConfMan.setActiveDomain(command); -		} else if (gd = findGameMatchingName(command), gd.gameId) { +		} else if (gd = findGameMatchingName(command), !gd.gameId.empty()) {  			// Command is a known game ID  			Common::String domainName = createTemporaryTarget(gd.engineId, gd.gameId);  			ConfMan.setActiveDomain(domainName); | 
