diff options
author | Filippos Karapetis | 2009-02-19 14:40:24 +0000 |
---|---|---|
committer | Filippos Karapetis | 2009-02-19 14:40:24 +0000 |
commit | 9ac6dbf9ebc2e8ade82b2bff596f2a674d9160f1 (patch) | |
tree | e8afa543d8cc305724eececcb21786aa9b1deeb8 /engines | |
parent | 3abc4c8842b87c7302f9443bc9baa7cc9d6727da (diff) | |
download | scummvm-rg350-9ac6dbf9ebc2e8ade82b2bff596f2a674d9160f1.tar.gz scummvm-rg350-9ac6dbf9ebc2e8ade82b2bff596f2a674d9160f1.tar.bz2 scummvm-rg350-9ac6dbf9ebc2e8ade82b2bff596f2a674d9160f1.zip |
Fixed version checking for unpacked executable files, and updated the SCI version for an entry for PQ2
svn-id: r38549
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/detection.cpp | 3 | ||||
-rw-r--r-- | engines/sci/exereader.cpp | 3 |
2 files changed, 3 insertions, 3 deletions
diff --git a/engines/sci/detection.cpp b/engines/sci/detection.cpp index 5c73fab57d..65755f4f65 100644 --- a/engines/sci/detection.cpp +++ b/engines/sci/detection.cpp @@ -930,7 +930,7 @@ static const struct SciGameDescription SciGameDescriptions[] = { {"resource.003", 0, "77f02def3094af804fd2371db25b7100", 591851}, {NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0}, {}, - SCI_VERSION(0, 000, 395) // FIXME: some versions are v. 0.000.409/0.000.490 + SCI_VERSION(0, 000, 490) // verified }, // Police Quest 3 - English Amiga (from www.back2roots.org) @@ -1449,7 +1449,6 @@ const ADGameDescription *SciMetaEngine::fallbackDetect(const Common::FSList &fsl // Is it really an executable file? Common::SeekableReadStream *fileStream = file->createReadStream(); bool isExe = isGameExe(fileStream); - int exeVersion = -1; if (isExe) { if (!readSciVersionFromExe(fileStream, &exeVersion)) { diff --git a/engines/sci/exereader.cpp b/engines/sci/exereader.cpp index 5c069d1304..46a4b2621a 100644 --- a/engines/sci/exereader.cpp +++ b/engines/sci/exereader.cpp @@ -236,7 +236,8 @@ void readExe(Common::SeekableReadStream *exeStream, byte *buffer) { bool isLZEXE = isLZEXECompressed(exeStream); if (!isLZEXE) { - exeStream->seek(0, SEEK_SET); + // Read the last VERSION_DETECT_BUF_SIZE bytes + exeStream->seek(exeStream->size() - VERSION_DETECT_BUF_SIZE, SEEK_SET); exeStream->read(buffer, VERSION_DETECT_BUF_SIZE); } else { // Read the two initial bytes |