diff --git a/Main/src/HFE.cpp b/Main/src/HFE.cpp index 526d3a7..c53e618 100644 --- a/Main/src/HFE.cpp +++ b/Main/src/HFE.cpp @@ -195,9 +195,11 @@ formatError: ::SetLastError(ERROR_BAD_FORMAT); // - construction of InternalTracks for both Heads if (!cylInfos[cyl].IsValid()) // maybe an error during Image creation? return CTrackReaderWriter::Invalid; - internalTracks[cyl][0]=BytesToTrack( ReadTrackBytes(cyl,0) ); - if (!params.flippyDisk) // flippy disks not known to be represented backwards in *.HFE, hence always fail if this flag is set - internalTracks[cyl][1]=BytesToTrack( ReadTrackBytes(cyl,1) ); + if (!internalTracks[cyl][0]) + internalTracks[cyl][0]=BytesToTrack( ReadTrackBytes(cyl,0) ); + if (!internalTracks[cyl][1]) + if (!params.flippyDisk) // flippy disks not known to be represented backwards in *.HFE, hence always fail if this flag is set + internalTracks[cyl][1]=BytesToTrack( ReadTrackBytes(cyl,1) ); const PInternalTrack &rit=internalTracks[cyl][head]; return rit ? *rit : CTrackReaderWriter::Invalid; }