mirror of
https://github.com/AppleWin/AppleWin.git
synced 2024-12-22 09:30:15 +00:00
Fix #317 -- some .img using version 0 instead of version 1
This commit is contained in:
parent
c4dfbaf988
commit
8a1d39104b
@ -1041,7 +1041,9 @@ eDetectResult C2IMGHelper::DetectHdr(LPBYTE& pImage, DWORD& dwImageSize, DWORD&
|
||||
if (dwImageSize < sizeof(Header2IMG) || pHdr->FormatID != FormatID_2IMG || pHdr->HeaderSize != sizeof(Header2IMG))
|
||||
return eMismatch;
|
||||
|
||||
if (pHdr->Version != 1)
|
||||
// https://github.com/AppleWin/AppleWin/issues/317
|
||||
// Work around some lazy implementations of the spec that set this value to 0 instead of the correct 1.
|
||||
if (pHdr->Version > 1)
|
||||
return eMismatch;
|
||||
|
||||
if (dwImageSize < sizeof(Header2IMG)+pHdr->DiskDataLength)
|
||||
|
Loading…
Reference in New Issue
Block a user