diff --git a/ports/cef/wrappers.rs b/ports/cef/wrappers.rs index d8929352c84..9964eac6728 100644 --- a/ports/cef/wrappers.rs +++ b/ports/cef/wrappers.rs @@ -246,7 +246,7 @@ impl<'a> CefWrap for String { let boxed_string; unsafe { let buffer = libc::malloc((mem::size_of::() as u64) * - ((utf16_chars.len() + 1) as u64 + 1)) as *mut u16; + ((utf16_chars.len() + 1) as u64)) as *mut u16; for (i, ch) in utf16_chars.iter().enumerate() { *buffer.offset(i as int) = *ch }