Skip to content

Commit

Permalink
solves Rust-SDL2#980
Browse files Browse the repository at this point in the history
  • Loading branch information
saucesaft authored Apr 16, 2020
1 parent 86c74ff commit 9b966fc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/sdl2/rwops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ impl<'a> io::Read for RWops<'a> {
// FIXME: it's better to use as_mut_ptr().
// number of objects read, or 0 at error or end of file.
let ret = unsafe {
((*self.raw).read.unwrap())(self.raw, buf.as_ptr() as *mut c_void, 1, out_len as u64)
((*self.raw).read.unwrap())(self.raw, buf.as_ptr() as *mut c_void, 1, out_len as sys::size_t)
};
Ok(ret as usize)
}
Expand All @@ -141,7 +141,7 @@ impl<'a> io::Write for RWops<'a> {
fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
let in_len = buf.len() as size_t;
let ret = unsafe {
((*self.raw).write.unwrap())(self.raw, buf.as_ptr() as *const c_void, 1, in_len as u64)
((*self.raw).write.unwrap())(self.raw, buf.as_ptr() as *const c_void, 1, in_len as sys::size_t)
};
Ok(ret as usize)
}
Expand Down

0 comments on commit 9b966fc

Please sign in to comment.