DIRECTOR: fix where dumped scripts starts with '-'
Prepend dumped scripts with 'stream' when the script resources weren't loaded via a file but a stream.
This commit is contained in:
parent
f8fa6ec649
commit
90c1ee36f6
1 changed files with 6 additions and 1 deletions
|
@ -508,8 +508,13 @@ bool RIFXArchive::openStream(Common::SeekableReadStream *stream, uint32 startOff
|
|||
data = (byte *)malloc(resources[i].size);
|
||||
dataSize = resources[i].size;
|
||||
}
|
||||
Common::String prepend;
|
||||
if (_fileName.size() != 0)
|
||||
prepend = _fileName;
|
||||
else
|
||||
prepend = "stream";
|
||||
|
||||
Common::String filename = Common::String::format("./dumps/%s-%s-%d", _fileName.c_str(), tag2str(resources[i].tag), i);
|
||||
Common::String filename = Common::String::format("./dumps/%s-%s-%d", prepend.c_str(), tag2str(resources[i].tag), i);
|
||||
stream->read(data, len);
|
||||
|
||||
if (!out.open(filename)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue