Skip to content

Commit 031212b

Browse files
committed
Fix smallest-hello-world.rs interaction with puts
It now hands `puts` a zero-terminated string, like it expects. Fix rust-lang#13603.
1 parent c44c7ab commit 031212b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/test/run-pass/smallest-hello-world.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ pub extern fn rust_stack_exhausted() {}
2626
#[no_split_stack]
2727
fn main(_: int, _: **u8) -> int {
2828
unsafe {
29-
let (ptr, _): (*u8, uint) = transmute("Hello!");
29+
let (ptr, _): (*u8, uint) = transmute("Hello!\0");
3030
puts(ptr);
3131
}
3232
return 0;

0 commit comments

Comments
 (0)