aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/engine/file.cpp
diff options
context:
space:
mode:
authorVincent Bénony2016-01-06 16:20:23 +0100
committerVincent Bénony2016-01-06 16:20:23 +0100
commitefdb5679ce6304dbc854afbbc511e633d7513338 (patch)
treee680a240e5f6018fc3a4cce53b50060caa22a929 /engines/sci/engine/file.cpp
parent4687ff6d6d2863cc95c8137543ecf9c39bc01723 (diff)
parentb72c02bad44749a1355acefdb198e36b2e772575 (diff)
downloadscummvm-rg350-efdb5679ce6304dbc854afbbc511e633d7513338.tar.gz
scummvm-rg350-efdb5679ce6304dbc854afbbc511e633d7513338.tar.bz2
scummvm-rg350-efdb5679ce6304dbc854afbbc511e633d7513338.zip
IOS: Merge branch 'master' into ios-fix
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..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) {
+ if ((handle == 0) || ((handle >= VIRTUALFILE_HANDLE_START) && (handle <= VIRTUALFILE_HANDLE_END))) {
error("Attempt to use invalid file handle (%d)", handle);
return 0;
}