aboutsummaryrefslogtreecommitdiff
path: root/engines/hugo/file.cpp
diff options
context:
space:
mode:
authorStrangerke2013-10-31 08:06:14 +0100
committerStrangerke2013-10-31 08:06:14 +0100
commitf1817431dfc022f73b137ce8ca573e9864b2c64b (patch)
tree0ea74ee5c0a5b066a106188436c1f8978918cea2 /engines/hugo/file.cpp
parentdef65045d6064c80e439c55c3bdd4a4216732935 (diff)
downloadscummvm-rg350-f1817431dfc022f73b137ce8ca573e9864b2c64b.tar.gz
scummvm-rg350-f1817431dfc022f73b137ce8ca573e9864b2c64b.tar.bz2
scummvm-rg350-f1817431dfc022f73b137ce8ca573e9864b2c64b.zip
HUGO: Fix CID 1063173, 1002888, 1002886
Diffstat (limited to 'engines/hugo/file.cpp')
-rw-r--r--engines/hugo/file.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/hugo/file.cpp b/engines/hugo/file.cpp
index e58c2e57d6..a9f56dea47 100644
--- a/engines/hugo/file.cpp
+++ b/engines/hugo/file.cpp
@@ -519,6 +519,7 @@ void FileManager::readBootFile() {
ofp.read(_vm->_boot._pbswitch, sizeof(_vm->_boot._pbswitch));
ofp.read(_vm->_boot._distrib, sizeof(_vm->_boot._distrib));
_vm->_boot._exitLen = ofp.readUint16LE();
+ ofp.close();
byte *p = (byte *)&_vm->_boot;
@@ -527,7 +528,6 @@ void FileManager::readBootFile() {
checksum ^= p[i];
p[i] ^= s_bootCypher[i % s_bootCypherLen];
}
- ofp.close();
if (checksum) {
Utils::notifyBox(Common::String::format("Corrupted startup file '%s'", getBootFilename()));