Fix broken logic for Format ProDOS and Format DOS 3.3 existing disk images.

This commit is contained in:
michaelangel007
2025-02-08 08:27:58 -08:00
parent 295f4c38e6
commit 1898ba80a9

View File

@@ -3405,12 +3405,12 @@ void Win32Frame::ProcessDiskPopupMenu(HWND hwnd, POINT pt, const int iDrive)
, MB_ICONWARNING | MB_YESNO | MB_DEFBUTTON2
);
if (nRes == IDYES)
{
std::string pathname = szFilename;
if (FileExists( pathname ))
{
nRes = Util_SelectDiskImage( hwnd, hInstance, pTitle, true, szFilename, pLoadFilter );
if (nRes)
{
std::string pathname = szFilename;
if (FileExists( pathname ))
{
FILE *hFile = fopen( pathname.c_str(), "r+b" );
if (hFile)
@@ -3494,12 +3494,12 @@ void Win32Frame::ProcessDiskPopupMenu(HWND hwnd, POINT pt, const int iDrive)
"(ALL DATA WILL BE LOST!)\n"
, "Format", MB_ICONWARNING|MB_YESNO);
if (nRes == IDYES)
{
std::string pathname = szFilename;
if (FileExists( pathname ))
{
nRes = Util_SelectDiskImage( hwnd, hInstance, pTitle, false, szFilename, pLoadFilter );
if (nRes)
{
std::string pathname = szFilename;
if (FileExists( pathname ))
{
FILE *hFile = fopen( pathname.c_str(), "r+b" );
if (hFile)