[Scummvm-git-logs] scummvm master -> 7880b1767636a4cea1e5f1a918e083f784b44674
dreammaster
dreammaster at scummvm.org
Thu Nov 10 04:03:46 CET 2016
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
7880b17676 TITANIC: Gracefully handle cases of specified sounds missing
Commit: 7880b1767636a4cea1e5f1a918e083f784b44674
https://github.com/scummvm/scummvm/commit/7880b1767636a4cea1e5f1a918e083f784b44674
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2016-11-09T22:03:40-05:00
Commit Message:
TITANIC: Gracefully handle cases of specified sounds missing
Changed paths:
engines/titanic/support/simple_file.cpp
diff --git a/engines/titanic/support/simple_file.cpp b/engines/titanic/support/simple_file.cpp
index 7e3cea3..65d2c85 100644
--- a/engines/titanic/support/simple_file.cpp
+++ b/engines/titanic/support/simple_file.cpp
@@ -467,7 +467,7 @@ void SimpleFile::skipSpaces() {
/*------------------------------------------------------------------------*/
bool StdCWadFile::open(const Common::String &filename) {
- File f;
+ Common::File f;
CString name = filename;
// Check for whether it is indeed a file/resource pair
@@ -476,9 +476,11 @@ bool StdCWadFile::open(const Common::String &filename) {
if (idx < 0) {
// Nope, so open up file for standard reading
assert(!name.empty());
- f.open(name);
+ if (!f.open(name))
+ return false;
SimpleFile::open(f.readStream(f.size()));
+ f.close();
return true;
}
@@ -489,7 +491,8 @@ bool StdCWadFile::open(const Common::String &filename) {
int resIndex = resStr.readInt();
// Open up the index for access
- f.open(fname);
+ if (!f.open(fname))
+ return false;
int indexSize = f.readUint32LE() / 4;
assert(resIndex < indexSize);
More information about the Scummvm-git-logs
mailing list