DIRECTOR: fix FileIO::m_fileName
Adding one to the prefix's length meant the first character of the filename would be omitted. Fixes Ganbare Inuchan 2 creating savegames with the first letter the player typed missing.
This commit is contained in:
parent
b2948060cf
commit
cd970d5942
1 changed files with 1 additions and 1 deletions
|
@ -494,7 +494,7 @@ void FileIO::m_fileName(int nargs) {
|
|||
Common::String prefix = g_director->getTargetName() + '-';
|
||||
Common::String res = *me->_filename;
|
||||
if (res.hasPrefix(prefix)) {
|
||||
res = Common::String(&me->_filename->c_str()[prefix.size() + 1]);
|
||||
res = Common::String(&me->_filename->c_str()[prefix.size()]);
|
||||
}
|
||||
|
||||
g_lingo->push(Datum(res));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue