mirror of
https://github.com/aaru-dps/libaaruformat.git
synced 2025-12-16 19:24:40 +00:00
Fix calculation of negative sectors offset in DDT tables.
This commit is contained in:
@@ -888,7 +888,7 @@ AARU_EXPORT int32_t AARU_CALL aaruf_read_sector_long(void *context, const uint64
|
||||
|
||||
// Calculate positive or negative sector
|
||||
if(negative)
|
||||
corrected_sector_address -= ctx->user_data_ddt_header.negative;
|
||||
corrected_sector_address = ctx->user_data_ddt_header.negative - sector_address;
|
||||
else
|
||||
corrected_sector_address += ctx->user_data_ddt_header.negative;
|
||||
|
||||
@@ -1529,7 +1529,7 @@ AARU_EXPORT int32_t AARU_CALL aaruf_read_sector_tag(const void *context, const u
|
||||
|
||||
// Calculate positive or negative sector
|
||||
if(negative)
|
||||
corrected_sector_address -= ctx->user_data_ddt_header.negative;
|
||||
corrected_sector_address = ctx->user_data_ddt_header.negative - sector_address;
|
||||
else
|
||||
corrected_sector_address += ctx->user_data_ddt_header.negative;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user