mirror of
https://github.com/wichtounet/thor-os.git
synced 2025-09-16 07:57:13 -04:00
Fix ramdisk read
This commit is contained in:
parent
553fc5f928
commit
94c04a035b
@ -59,9 +59,9 @@ size_t ramdisk::ramdisk_driver::read(void* data, char* destination, size_t count
|
||||
|
||||
// If the page is not allocated, we simply consider it full of zero
|
||||
if(!disk->allocated[page]){
|
||||
std::fill_n(destination, to_read, 0);
|
||||
std::fill_n(destination + read, to_read, 0);
|
||||
} else {
|
||||
std::copy_n(destination, disk->allocated[page] + page_offset, to_read);
|
||||
std::copy_n(destination + read, disk->allocated[page] + page_offset, to_read);
|
||||
}
|
||||
|
||||
read += to_read;
|
||||
|
Loading…
x
Reference in New Issue
Block a user