aboutsummaryrefslogtreecommitdiff
path: root/std/cstr.zig
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2017-10-14 17:39:44 -0400
committerAndrew Kelley <superjoe30@gmail.com>2017-10-14 17:39:44 -0400
commit61d715d784f3969ed9cff8b9f16cb6a051d3533a (patch)
treed4aa5138463b524db5119c1d41a33e1bf690fe97 /std/cstr.zig
parentad6eec94804d4bfc8c16ea8c852cd32f1f822e97 (diff)
downloadzig-61d715d784f3969ed9cff8b9f16cb6a051d3533a.tar.gz
zig-61d715d784f3969ed9cff8b9f16cb6a051d3533a.zip
implement std.os.symLink for windows
Diffstat (limited to 'std/cstr.zig')
-rw-r--r--std/cstr.zig2
1 files changed, 1 insertions, 1 deletions
diff --git a/std/cstr.zig b/std/cstr.zig
index 7e61381b90..e29f90fc01 100644
--- a/std/cstr.zig
+++ b/std/cstr.zig
@@ -45,5 +45,5 @@ pub fn addNullByte(allocator: &mem.Allocator, slice: []const u8) -> %[]u8 {
const result = %return allocator.alloc(u8, slice.len + 1);
mem.copy(u8, result, slice);
result[slice.len] = 0;
- return result[0..slice.len];
+ return result;
}