diff options
Diffstat (limited to 'engines/sci/engine/file.cpp')
-rw-r--r-- | engines/sci/engine/file.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/sci/engine/file.cpp b/engines/sci/engine/file.cpp index 49e6e1716d..a602cb4503 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; } |