mirror of
https://github.com/vivier/EMILE.git
synced 2025-08-15 07:27:41 +00:00
Correct read_sector call (provide device->data instead of device)
This commit is contained in:
@@ -4,6 +4,7 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "libblock.h"
|
#include "libblock.h"
|
||||||
@@ -22,7 +23,7 @@ size_t block_read(block_FILE *file, void *ptr, size_t size)
|
|||||||
|
|
||||||
if (block_nb != file->current)
|
if (block_nb != file->current)
|
||||||
{
|
{
|
||||||
ret = file->device->read_sector(file->device,
|
ret = file->device->read_sector(file->device->data,
|
||||||
(block_nb * file->buffer_size) / blocksize,
|
(block_nb * file->buffer_size) / blocksize,
|
||||||
file->buffer,
|
file->buffer,
|
||||||
file->buffer_size);
|
file->buffer_size);
|
||||||
|
Reference in New Issue
Block a user