Skip to content

Commit

Permalink
Fix Apple vendor mode page sending (#272)
Browse files Browse the repository at this point in the history
Apparently there was a mistake between || and && that caused
Apple vendor page to be sent even when Apple quirks were disabled
and when it wouldn't fit the buffer.
  • Loading branch information
PetteriAimonen authored and erichelgeson committed Sep 12, 2023
1 parent f27fc20 commit 0abf488
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/SCSI2SD/src/firmware/mode.c
Original file line number Diff line number Diff line change
Expand Up @@ -516,10 +516,8 @@ static void doModeSense(

idx += modeSenseCDCapabilitiesPage(pc, idx, pageCode, &pageFound);

if ((
(scsiDev.target->cfg->quirks == S2S_CFG_QUIRKS_APPLE) ||
(idx + sizeof(AppleVendorPage) <= allocLength)
) &&
if ((scsiDev.target->cfg->quirks == S2S_CFG_QUIRKS_APPLE) &&
(idx + sizeof(AppleVendorPage) <= allocLength) &&
(pageCode == 0x30 || pageCode == 0x3F))
{
pageFound = 1;
Expand Down

0 comments on commit 0abf488

Please sign in to comment.