mirror of
https://github.com/AppleWin/AppleWin.git
synced 2025-01-24 00:34:43 +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(':')))
|
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;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2024,7 +2024,7 @@ Update_t CmdTraceFile (int nArgs)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::string sFileName;;
|
std::string sFileName;
|
||||||
|
|
||||||
if (nArgs)
|
if (nArgs)
|
||||||
sFileName = g_aArgs[1].sArg;
|
sFileName = g_aArgs[1].sArg;
|
||||||
|
@ -49,7 +49,7 @@ ImageError_e ImageOpen( const std::string & pszImageFilename,
|
|||||||
if (bExpectFloppy && sg_DiskImageHelper.GetWorkBuffer() == NULL)
|
if (bExpectFloppy && sg_DiskImageHelper.GetWorkBuffer() == NULL)
|
||||||
return eIMAGE_ERROR_BAD_POINTER;
|
return eIMAGE_ERROR_BAD_POINTER;
|
||||||
|
|
||||||
if (! (ppImageInfo && pWriteProtected))
|
if (!(!pszImageFilename.empty() && ppImageInfo && pWriteProtected))
|
||||||
return eIMAGE_ERROR_BAD_POINTER;
|
return eIMAGE_ERROR_BAD_POINTER;
|
||||||
|
|
||||||
// CREATE A RECORD FOR THE FILE
|
// CREATE A RECORD FOR THE FILE
|
||||||
|
Loading…
x
Reference in New Issue
Block a user