From f1817431dfc022f73b137ce8ca573e9864b2c64b Mon Sep 17 00:00:00 2001 From: Strangerke Date: Thu, 31 Oct 2013 08:06:14 +0100 Subject: HUGO: Fix CID 1063173, 1002888, 1002886 --- engines/hugo/file.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/hugo/file.cpp') 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())); -- cgit v1.2.3