diff options
author | Dmitry Iskrich | 2016-06-07 17:02:56 +0300 |
---|---|---|
committer | Eugene Sandulenko | 2016-08-03 23:40:36 +0200 |
commit | cd0e04f672656bdf32e23334e4768d4bece56636 (patch) | |
tree | 4feec8a8d337a5ce73cf7a680673cf5362134f8c /engines/director | |
parent | bc2e73c20b28d4582c1a8a17ce03a8d6beda0ca9 (diff) | |
download | scummvm-rg350-cd0e04f672656bdf32e23334e4768d4bece56636.tar.gz scummvm-rg350-cd0e04f672656bdf32e23334e4768d4bece56636.tar.bz2 scummvm-rg350-cd0e04f672656bdf32e23334e4768d4bece56636.zip |
DIRECTOR: Check if file is open, rename dump folder
Diffstat (limited to 'engines/director')
-rw-r--r-- | engines/director/score.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/engines/director/score.cpp b/engines/director/score.cpp index cfd4a43230..f01ff4e31a 100644 --- a/engines/director/score.cpp +++ b/engines/director/score.cpp @@ -259,9 +259,12 @@ void Score::dumpScript(uint16 id, scriptType type, Common::String script) { break; } - sprintf(buf, "./dump/%s-%s-%d.txt", _macName.c_str(), typeName.c_str(), id); + sprintf(buf, "./dumps/%s-%s-%d.txt", _macName.c_str(), typeName.c_str(), id); - out.open(buf); + if (!out.open(buf)) { + warning("Can not open dump file %s", buf); + return; + } out.writeString(script); out.flush(); |