diff options
author | Kamil Zbróg | 2013-11-04 11:40:22 +0000 |
---|---|---|
committer | Kamil Zbróg | 2013-11-04 11:40:22 +0000 |
commit | 85694ec1f5793eb4025f4153ef4bf71d3769d699 (patch) | |
tree | c93fab58eb2f52eca244895a9867d28134dbd7f5 /engines/hugo/file.cpp | |
parent | 026390145b0e947be7cccf3d9ba329eb2270a2ed (diff) | |
parent | 9dc35033f523c9c694f24e15ed45ba6194786a25 (diff) | |
download | scummvm-rg350-85694ec1f5793eb4025f4153ef4bf71d3769d699.tar.gz scummvm-rg350-85694ec1f5793eb4025f4153ef4bf71d3769d699.tar.bz2 scummvm-rg350-85694ec1f5793eb4025f4153ef4bf71d3769d699.zip |
Merge remote-tracking branch 'own/prince' into prince-malik
Conflicts:
engines/prince/debugger.cpp
engines/prince/debugger.h
engines/prince/detection.cpp
engines/prince/font.cpp
engines/prince/graphics.cpp
engines/prince/prince.cpp
engines/prince/prince.h
engines/prince/script.cpp
engines/prince/script.h
Diffstat (limited to 'engines/hugo/file.cpp')
-rw-r--r-- | engines/hugo/file.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/engines/hugo/file.cpp b/engines/hugo/file.cpp index e58c2e57d6..aa128048af 100644 --- a/engines/hugo/file.cpp +++ b/engines/hugo/file.cpp @@ -246,13 +246,13 @@ SoundPtr FileManager::getSound(const int16 sound, uint16 *size) { // No more to do if SILENCE (called for cleanup purposes) if (sound == _vm->_soundSilence) - return 0; + return nullptr; // Open sounds file Common::File fp; // Handle to SOUND_FILE if (!fp.open(getSoundFilename())) { warning("Hugo Error: File not found %s", getSoundFilename()); - return 0; + return nullptr; } if (!_hasReadHeader) { @@ -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())); |