From 031212bfd9aadd5e77fef0f5b48ad0d6c81ad6d5 Mon Sep 17 00:00:00 2001 From: Tobias Bucher Date: Sat, 19 Apr 2014 00:34:55 +0200 Subject: [PATCH] Fix smallest-hello-world.rs interaction with `puts` It now hands `puts` a zero-terminated string, like it expects. Fix #13603. --- src/test/run-pass/smallest-hello-world.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/run-pass/smallest-hello-world.rs b/src/test/run-pass/smallest-hello-world.rs index 65288cf0416..b95f0769d53 100644 --- a/src/test/run-pass/smallest-hello-world.rs +++ b/src/test/run-pass/smallest-hello-world.rs @@ -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;