aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine/file.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci/engine/file.cpp')
-rw-r--r--engines/sci/engine/file.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/sci/engine/file.cpp b/engines/sci/engine/file.cpp
index 623caec856..49e6e1716d 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) {
+ if (handle == 0 || handle >= VIRTUALFILE_HANDLE_START) {
error("Attempt to use invalid file handle (%d)", handle);
return 0;
}