Fixed multi-zip regression (numTracks was getting zeroed). (Fixes #824)

This commit is contained in:
tomcw 2020-08-17 20:24:53 +01:00
parent 039ad8a547
commit bcd8fcc726
2 changed files with 2 additions and 1 deletions

View File

@ -81,7 +81,7 @@ ImageError_e ImageOpen( const std::string & pszImageFilename,
if (!bExpectFloppy)
return eIMAGE_ERROR_UNSUPPORTED;
pImageInfo->uNumTracks = sg_DiskImageHelper.GetNumTracksInImage(pImageInfo->pImageType);
_ASSERT(pImageInfo->uNumTracks);
*pWriteProtected = pImageInfo->bWriteProtected;

View File

@ -1891,6 +1891,7 @@ void CImageHelperBase::SetImageInfo(ImageInfo* pImageInfo, FileType_e fileType,
pImageInfo->uOffset = dwOffset;
pImageInfo->pImageType = pImageType;
pImageInfo->uImageSize = dwSize;
pImageInfo->uNumTracks = pImageType->m_uNumTracksInImage;// Copy ImageType's m_uNumTracksInImage, which may get trashed by subsequent images in the zip (GH#824)
}
//-------------------------------------