Add support for negative sector addresses in read/write functions

This commit is contained in:
2025-10-02 17:07:17 +01:00
parent 5c7610c1c0
commit a8f39093bb
10 changed files with 114 additions and 85 deletions

View File

@@ -93,7 +93,7 @@ int convert(const char *input_path, const char *output_path)
}
// Read sector from input
res = aaruf_read_sector(input_ctx, sector, sector_data, &read_length);
res = aaruf_read_sector(input_ctx, sector, false, sector_data, &read_length);
if(res != AARUF_STATUS_OK)
{
printf("\nError %d when reading sector %llu from input image.\n", res, (unsigned long long)sector);
@@ -101,7 +101,7 @@ int convert(const char *input_path, const char *output_path)
}
// Write sector to output
res = aaruf_write_sector(output_ctx, sector, sector_data, SectorStatusDumped, read_length);
res = aaruf_write_sector(output_ctx, sector, false, sector_data, SectorStatusDumped, read_length);
if(res != AARUF_STATUS_OK)
{
printf("\nError %d when writing sector %llu to output image.\n", res, (unsigned long long)sector);