Fix size of event: read in redox epoll implementation
This commit is contained in:
@@ -97,7 +97,10 @@ impl PalEpoll for Sys {
|
||||
};
|
||||
|
||||
let bytes_read = Sys::read(epfd, unsafe {
|
||||
slice::from_raw_parts_mut(events as *mut u8, maxevents as usize)
|
||||
slice::from_raw_parts_mut(
|
||||
events as *mut u8,
|
||||
maxevents as usize * mem::size_of::<syscall::Event>(),
|
||||
)
|
||||
});
|
||||
if bytes_read == -1 {
|
||||
return -1;
|
||||
|
||||
Reference in New Issue
Block a user