Skip to content

Commit

Permalink
Fix smallest-hello-world.rs interaction with puts
Browse files Browse the repository at this point in the history
It now hands `puts` a zero-terminated string, like it expects.

Fix rust-lang#13603.
  • Loading branch information
tbu- committed Apr 18, 2014
1 parent c44c7ab commit 031212b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/test/run-pass/smallest-hello-world.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

1 comment on commit 031212b

@alexcrichton
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r+

Please sign in to comment.