Fix fread using the item count as the buffer size

This commit is contained in:
pjht 2019-09-10 19:23:13 -05:00
parent 347113d194
commit 9d849a0f23

View File

@ -185,10 +185,10 @@ size_t fread(void* buffer_ptr,size_t size,size_t count,FILE* stream) {
return 0;
} else {
msg.msg=buffer;
mailbox_get_msg(box,&msg,count);
mailbox_get_msg(box,&msg,bytes);
while (msg.from==0) {
yieldToPID(VFS_PID);
mailbox_get_msg(box,&msg,count);
mailbox_get_msg(box,&msg,bytes);
}
free(vfs_msg);
return count;