Fix fread using the item count as the buffer size
This commit is contained in:
parent
347113d194
commit
9d849a0f23
@ -185,10 +185,10 @@ size_t fread(void* buffer_ptr,size_t size,size_t count,FILE* stream) {
|
|||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
msg.msg=buffer;
|
msg.msg=buffer;
|
||||||
mailbox_get_msg(box,&msg,count);
|
mailbox_get_msg(box,&msg,bytes);
|
||||||
while (msg.from==0) {
|
while (msg.from==0) {
|
||||||
yieldToPID(VFS_PID);
|
yieldToPID(VFS_PID);
|
||||||
mailbox_get_msg(box,&msg,count);
|
mailbox_get_msg(box,&msg,bytes);
|
||||||
}
|
}
|
||||||
free(vfs_msg);
|
free(vfs_msg);
|
||||||
return count;
|
return count;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user