diff options
author | Philipp Gesang <phg@phi-gamma.net> | 2015-05-08 07:28:00 +0200 |
---|---|---|
committer | Philipp Gesang <phg@phi-gamma.net> | 2015-05-08 07:28:00 +0200 |
commit | a2a7e831b6f8bca1e0e250e373e011e9b85f11f9 (patch) | |
tree | 119ee992c66f4f5ee084f5e1d97efd2034cfa9bc | |
parent | 5559c7060a69808e1bf2404c22f456962bb14d60 (diff) | |
download | vtcol-a2a7e831b6f8bca1e0e250e373e011e9b85f11f9.tar.gz |
vtcol.rs: choose correct type of argument passed to write()
D’oh!
Thanks to /u/DroidLogician for the pointer:
http://www.reddit.com/r/rust/comments/3588d4/suggestions_for_handling_architecturedependent/cr22okf
-rw-r--r-- | src/vtcol.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vtcol.rs b/src/vtcol.rs index ff1fc2f..0c042e3 100644 --- a/src/vtcol.rs +++ b/src/vtcol.rs @@ -601,7 +601,7 @@ get_console_fd fn write_to_term (fd : Fd, buf : &str) { - let len = buf.len() as u64; + let len = buf.len() as libc::size_t; let raw = std::ffi::CString::new(buf.as_bytes()).unwrap(); unsafe { libc::write(fd, raw.as_ptr() as *const libc::c_void, len) }; } |