From dd505ff6aebbe3f321d8bbebabc32a471c2ac0c8 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Sat, 25 Mar 2006 21:17:38 +0000 Subject: Fixing bug #1458388: "SIMON1: Game Detection fails". Sometimes instead of "GAMEPC" we get "GAMEPC." (note trailing dot) svn-id: r21455 --- common/file.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'common') diff --git a/common/file.cpp b/common/file.cpp index b5e2857905..c9917f698a 100644 --- a/common/file.cpp +++ b/common/file.cpp @@ -221,6 +221,11 @@ bool File::open(const char *filename, AccessMode mode, const char *directory) { } else if (_filesMap.contains(fname)) { debug(3, "Opening hashed: %s", _filesMap[fname].c_str()); _handle = fopen(_filesMap[fname].c_str(), modeStr); + } else if (_filesMap.contains(fname + ".")) { + // WORKAROUND: Bug #1458388: "SIMON1: Game Detection fails" + // sometimes instead of "GAMEPC" we get "GAMEPC." (note trailing dot) + debug(3, "Opening hashed: %s", _filesMap[fname].c_str()); + _handle = fopen(_filesMap[fname].c_str(), modeStr); } else { StringList::const_iterator x; -- cgit v1.2.3