[Scummvm-git-logs] scummvm master -> cd970d594286c2d588e4594d1efa0365c00587da

mistydemeo noreply at scummvm.org
Wed Jul 5 22:19:00 UTC 2023


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:
cd970d5942 DIRECTOR: fix FileIO::m_fileName


Commit: cd970d594286c2d588e4594d1efa0365c00587da
    https://github.com/scummvm/scummvm/commit/cd970d594286c2d588e4594d1efa0365c00587da
Author: Misty De Meo (mistydemeo at gmail.com)
Date: 2023-07-05T15:18:50-07:00

Commit Message:
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.

Changed paths:
    engines/director/lingo/xlibs/fileio.cpp


diff --git a/engines/director/lingo/xlibs/fileio.cpp b/engines/director/lingo/xlibs/fileio.cpp
index 51bf435642d..928efc5e3ef 100644
--- a/engines/director/lingo/xlibs/fileio.cpp
+++ b/engines/director/lingo/xlibs/fileio.cpp
@@ -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));




More information about the Scummvm-git-logs mailing list