[Scummvm-cvs-logs] scummvm master -> 7b1df2174db623b7b6b36bea48d9c36a4a0d4cb3
m-kiewitz
m_kiewitz at users.sourceforge.net
Tue Jan 5 19:44:37 CET 2016
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:
7b1df2174d SCI: fix compatibility issue in kFileIO
Commit: 7b1df2174db623b7b6b36bea48d9c36a4a0d4cb3
https://github.com/scummvm/scummvm/commit/7b1df2174db623b7b6b36bea48d9c36a4a0d4cb3
Author: Martin Kiewitz (m_kiewitz at users.sourceforge.net)
Date: 2016-01-05T19:44:45+01:00
Commit Message:
SCI: fix compatibility issue in kFileIO
Allow 0xFFFF as invalid file handle again for kFileIO calls
Fan game "Dating Pool" opens a non-existant file at the start
and tries to read it, even though it shouldn't do the latter.
The sciAudio adjustments changed our behavior to error() out in
such a case. This commit changes it back to our old behavior to
only print out a warning.
Changed paths:
engines/sci/engine/file.cpp
engines/sci/engine/file.h
diff --git a/engines/sci/engine/file.cpp b/engines/sci/engine/file.cpp
index 49e6e17..a602cb4 100644
--- a/engines/sci/engine/file.cpp
+++ b/engines/sci/engine/file.cpp
@@ -129,7 +129,7 @@ reg_t file_open(EngineState *s, const Common::String &filename, int mode, bool u
}
FileHandle *getFileFromHandle(EngineState *s, uint handle) {
- if (handle == 0 || handle >= VIRTUALFILE_HANDLE_START) {
+ if ((handle == 0) || ((handle >= VIRTUALFILE_HANDLE_START) && (handle <= VIRTUALFILE_HANDLE_END))) {
error("Attempt to use invalid file handle (%d)", handle);
return 0;
}
diff --git a/engines/sci/engine/file.h b/engines/sci/engine/file.h
index f43958c..54627d5 100644
--- a/engines/sci/engine/file.h
+++ b/engines/sci/engine/file.h
@@ -45,6 +45,7 @@ enum {
#define VIRTUALFILE_HANDLE_SCI32SAVE 32100
#define PHANTASMAGORIA_SAVEGAME_INDEX "phantsg.dir"
#define VIRTUALFILE_HANDLE_SCIAUDIO 32300
+#define VIRTUALFILE_HANDLE_END 32300
struct SavegameDesc {
int16 id;
More information about the Scummvm-git-logs
mailing list