Fix a cache retrieving bug
This commit is contained in:
parent
d8a2bcf564
commit
0c512b092c
1 changed files with 2 additions and 1 deletions
|
@ -571,7 +571,8 @@ grub_disk_read (grub_disk_t disk, grub_disk_addr_t sector,
|
|||
|
||||
if (data)
|
||||
{
|
||||
grub_memcpy (buf, data, GRUB_DISK_CACHE_SIZE);
|
||||
grub_memcpy (buf, data,
|
||||
GRUB_DISK_CACHE_SIZE << GRUB_DISK_SECTOR_BITS);
|
||||
sector += GRUB_DISK_CACHE_SIZE;
|
||||
buf = (char *) buf + (GRUB_DISK_CACHE_SIZE << GRUB_DISK_SECTOR_BITS);
|
||||
size -= (GRUB_DISK_CACHE_SIZE << GRUB_DISK_SECTOR_BITS);
|
||||
|
|
Loading…
Reference in a new issue