mirror of
https://github.com/aaru-dps/libaaruformat.git
synced 2025-12-16 19:24:40 +00:00
Fix memcpy offset calculation in aaruf_read_sector() for correct data retrieval
This commit is contained in:
@@ -193,7 +193,7 @@ int32_t aaruf_read_sector(void *context, uint64_t sectorAddress, uint8_t *data,
|
|||||||
if(block != NULL)
|
if(block != NULL)
|
||||||
{
|
{
|
||||||
TRACE("Getting data from cache");
|
TRACE("Getting data from cache");
|
||||||
memcpy(data, block + offset, blockHeader->sectorSize);
|
memcpy(data, block + offset * blockHeader->sectorSize, blockHeader->sectorSize);
|
||||||
*length = blockHeader->sectorSize;
|
*length = blockHeader->sectorSize;
|
||||||
|
|
||||||
TRACE("Exiting aaruf_read_sector() = AARUF_STATUS_OK");
|
TRACE("Exiting aaruf_read_sector() = AARUF_STATUS_OK");
|
||||||
|
|||||||
Reference in New Issue
Block a user