mirror of
https://github.com/AppleWin/AppleWin.git
synced 2024-06-29 20:29:52 +00:00
1.25.0.2 Fixed: F12 Snapshot_LoadState() -> Snapshot_SetFilename() not keeping trailing backslash on path
This commit is contained in:
parent
1083f0e981
commit
807fcce1ef
|
@ -621,6 +621,16 @@ void LoadConfiguration(void)
|
||||||
void SetCurrentImageDir(const char* pszImageDir)
|
void SetCurrentImageDir(const char* pszImageDir)
|
||||||
{
|
{
|
||||||
strcpy(g_sCurrentDir, pszImageDir);
|
strcpy(g_sCurrentDir, pszImageDir);
|
||||||
|
|
||||||
|
#if _DEBUG
|
||||||
|
int nLen = strlen( g_sCurrentDir );
|
||||||
|
if( g_sCurrentDir[ nLen - 1 ] != '\\' )
|
||||||
|
{
|
||||||
|
g_sCurrentDir[ nLen - 1 ] = '\\';
|
||||||
|
g_sCurrentDir[ nLen ] = 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
SetCurrentDirectory(g_sCurrentDir);
|
SetCurrentDirectory(g_sCurrentDir);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -74,7 +74,7 @@ void Snapshot_SetFilename(std::string strPathname)
|
||||||
if (nIdx >= 0 && nIdx+1 < (int)strPathname.length())
|
if (nIdx >= 0 && nIdx+1 < (int)strPathname.length())
|
||||||
{
|
{
|
||||||
strFilename = &strPathname[nIdx+1];
|
strFilename = &strPathname[nIdx+1];
|
||||||
g_strSaveStatePath = strPathname.substr(0, nIdx);
|
g_strSaveStatePath = strPathname.substr(0, nIdx+1); // Bugfix: 1.25.0.2 // Snapshot_LoadState() -> SetCurrentImageDir() -> g_sCurrentDir
|
||||||
}
|
}
|
||||||
|
|
||||||
g_strSaveStateFilename = strFilename;
|
g_strSaveStateFilename = strFilename;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user