Skip to content

Commit

Permalink
pci: fix in file position update
Browse files Browse the repository at this point in the history
  • Loading branch information
jewelcodes committed Oct 6, 2024
1 parent 08089c9 commit 53ab15c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion devices/pci/src/io.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ void pciReadFile(RWCommand *rcmd) {
if((rcmd->position+rcmd->length) > file->size) truelen = file->size - rcmd->position;
else truelen = rcmd->length;

memcpy(rcmd->data, file->data, truelen);
memcpy(rcmd->data, file->data + rcmd->position, truelen);
rcmd->length = truelen;
rcmd->header.header.status = truelen;
rcmd->header.header.length += truelen;
Expand Down

0 comments on commit 53ab15c

Please sign in to comment.