mirror of
https://github.com/aaru-dps/libaaruformat.git
synced 2025-12-16 19:24:40 +00:00
Fix returning proper status in aaruf_read_sector_long().
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user