Fix returning proper status in aaruf_read_sector_long().

This commit is contained in:
2022-10-12 16:22:33 +01:00
parent ca0de28e13
commit 83e1ed5cb6

View File

@@ -365,6 +365,8 @@ int32_t aaruf_read_sector_long(void* context, uint64_t sectorAddress, uint8_t* d
else
return AARUF_ERROR_REACHED_UNREACHABLE_CODE;
if(res != AARUF_STATUS_OK) return res;
if(ctx->sectorSuffix != NULL) memcpy(data + 2064, ctx->sectorSuffix + sectorAddress * 288, 288);
else if(ctx->sectorSuffixDdt != NULL)
{
@@ -415,6 +417,8 @@ int32_t aaruf_read_sector_long(void* context, uint64_t sectorAddress, uint8_t* d
else
return AARUF_ERROR_REACHED_UNREACHABLE_CODE;
if(res != AARUF_STATUS_OK) return res;
if(ctx->mode2Subheaders != NULL && ctx->sectorSuffixDdt != NULL)
{
memcpy(data + 16, ctx->mode2Subheaders + sectorAddress * 8, 8);