[Scummvm-git-logs] scummvm master -> 8ab359cb0f760ff06dc9363f7f873ab54ac6752a
bluegr
noreply at scummvm.org
Mon Aug 19 14:13:38 UTC 2024
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:
8ab359cb0f AGS: Maintain valid filename in fallback detection
Commit: 8ab359cb0f760ff06dc9363f7f873ab54ac6752a
https://github.com/scummvm/scummvm/commit/8ab359cb0f760ff06dc9363f7f873ab54ac6752a
Author: antoniou79 (a.antoniou79 at gmail.com)
Date: 2024-08-19T17:13:35+03:00
Commit Message:
AGS: Maintain valid filename in fallback detection
Currently the desc.filesDescriptions[0].fileName would contain garbage after returing from ADDetectedGame AGSMetaEngineDetection::fallbackDetect()
Changed paths:
engines/ags/detection.cpp
engines/ags/detection.h
diff --git a/engines/ags/detection.cpp b/engines/ags/detection.cpp
index dae794d2083..77ab51c4cd8 100644
--- a/engines/ags/detection.cpp
+++ b/engines/ags/detection.cpp
@@ -177,7 +177,9 @@ ADDetectedGame AGSMetaEngineDetection::fallbackDetect(const FileMap &allFiles, c
AGS::g_fallbackDesc.desc.gameId = _gameid.c_str();
AGS::g_fallbackDesc.desc.extra = _extra.c_str();
- AGS::g_fallbackDesc.desc.filesDescriptions[0].fileName = _filename.toString('/').c_str();
+
+ _filenameStr = _filename.toString('/');
+ AGS::g_fallbackDesc.desc.filesDescriptions[0].fileName = _filenameStr.c_str();
AGS::g_fallbackDesc.desc.filesDescriptions[0].fileSize = (f.size() >= 0xffffffff) ? AD_NO_SIZE : f.size();
AGS::g_fallbackDesc.desc.filesDescriptions[0].md5 = _md5.c_str();
diff --git a/engines/ags/detection.h b/engines/ags/detection.h
index 7be5acffd7b..fa1939c354f 100644
--- a/engines/ags/detection.h
+++ b/engines/ags/detection.h
@@ -67,6 +67,7 @@ class AGSMetaEngineDetection : public AdvancedMetaEngineDetection<AGS::AGSGameDe
mutable Common::String _gameid;
mutable Common::String _extra;
mutable Common::Path _filename;
+ mutable Common::String _filenameStr;
mutable Common::String _md5;
static const DebugChannelDef debugFlagList[];
More information about the Scummvm-git-logs
mailing list