mirror of
https://github.com/AppleWin/AppleWin.git
synced 2025-01-09 05:32:05 +00:00
Fix a couple of issues around std::string.
Signed-off-by: Andrea Odetti <mariofutire@gmail.com>
This commit is contained in:
parent
dced4793b7
commit
be476f9a9c
@ -483,7 +483,7 @@ void GetProgramDirectory(void)
|
||||
{
|
||||
if ((g_sProgramDir[loop] == TEXT('\\')) || (g_sProgramDir[loop] == TEXT(':')))
|
||||
{
|
||||
g_sProgramDir.resize(loop); // this reduces the size
|
||||
g_sProgramDir.resize(loop + 1); // this reduces the size
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -2024,7 +2024,7 @@ Update_t CmdTraceFile (int nArgs)
|
||||
}
|
||||
else
|
||||
{
|
||||
std::string sFileName;;
|
||||
std::string sFileName;
|
||||
|
||||
if (nArgs)
|
||||
sFileName = g_aArgs[1].sArg;
|
||||
|
@ -49,7 +49,7 @@ ImageError_e ImageOpen( const std::string & pszImageFilename,
|
||||
if (bExpectFloppy && sg_DiskImageHelper.GetWorkBuffer() == NULL)
|
||||
return eIMAGE_ERROR_BAD_POINTER;
|
||||
|
||||
if (! (ppImageInfo && pWriteProtected))
|
||||
if (!(!pszImageFilename.empty() && ppImageInfo && pWriteProtected))
|
||||
return eIMAGE_ERROR_BAD_POINTER;
|
||||
|
||||
// CREATE A RECORD FOR THE FILE
|
||||
|
Loading…
Reference in New Issue
Block a user