From e79f0a5c811d287a99355252e182ef39adf0dc7b Mon Sep 17 00:00:00 2001 From: Zvika Haramaty Date: Sun, 17 Apr 2022 12:05:19 +0300 Subject: [PATCH] AGI: *.wag fallback - use description and version only if not empty strings --- engines/agi/detection.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/engines/agi/detection.cpp b/engines/agi/detection.cpp index 1c212612c11..1e4053b4d0a 100644 --- a/engines/agi/detection.cpp +++ b/engines/agi/detection.cpp @@ -282,12 +282,12 @@ ADDetectedGame AgiMetaEngineDetection::fallbackDetect(const FileMap &allFilesXXX } // Set game description and extra according to *.wag file information if they're present - if (wagGameDesc != nullptr) { + if (wagGameDesc != nullptr && Common::String(wagGameDesc->getData()) != "\"\"") { description = wagGameDesc->getData(); debug(3, "Agi::fallbackDetector: Game description (%s) from WAG file", wagGameDesc->getData()); // If there's game version in the *.wag file, set extra to it - if (wagGameVer != nullptr) { + if (wagGameVer != nullptr && Common::String(wagGameVer->getData()) != "\"\"") { _extra = wagGameVer->getData(); debug(3, "Agi::fallbackDetector: Game version (%s) from WAG file", wagGameVer->getData()); }