aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/sci/detection.cpp3
-rw-r--r--engines/sci/exereader.cpp3
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