diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2018-01-04 13:48:45 -0500 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2018-01-04 13:48:45 -0500 |
| commit | e1c03d9e8eb52b489d9b47bbe2f12cacac8a999f (patch) | |
| tree | e5a79ed89a82f5db8a9ce963f4edd0d7b5f72295 /std/io.zig | |
| parent | 0cd63b28f32fdf5aaedf9daa8ff60ec58de2f7f4 (diff) | |
| download | zig-e1c03d9e8eb52b489d9b47bbe2f12cacac8a999f.tar.gz zig-e1c03d9e8eb52b489d9b47bbe2f12cacac8a999f.zip | |
self-hosted compiler works on windows
* better error message for realpath failing
* fix bug in std.io.readFileAllocExtra incorrectly returning
error.EndOfStream
* implement std.os.selfExePath and std.os.selfExeDirPath for windows
Diffstat (limited to 'std/io.zig')
| -rw-r--r-- | std/io.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/std/io.zig b/std/io.zig index 44e5634ae0..9c39a02a8c 100644 --- a/std/io.zig +++ b/std/io.zig @@ -513,7 +513,7 @@ pub fn readFileAllocExtra(path: []const u8, allocator: &mem.Allocator, extra_len %defer allocator.free(buf); var adapter = FileInStream.init(&file); - %return adapter.stream.readNoEof(buf); + %return adapter.stream.readNoEof(buf[0..size]); return buf; } |
