Fix smallest-hello-world.rs interaction with puts

It now hands `puts` a zero-terminated string, like it expects.

Fix #13603.
This commit is contained in:
Tobias Bucher 2014-04-19 00:34:55 +02:00
parent c44c7abb42
commit 031212bfd9

View File

@ -26,7 +26,7 @@ pub extern fn rust_stack_exhausted() {}
#[no_split_stack]
fn main(_: int, _: **u8) -> int {
unsafe {
let (ptr, _): (*u8, uint) = transmute("Hello!");
let (ptr, _): (*u8, uint) = transmute("Hello!\0");
puts(ptr);
}
return 0;