aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2018-05-11 23:04:41 -0400
committerAndrew Kelley <superjoe30@gmail.com>2018-05-11 23:04:41 -0400
commit4277762b742216d4dd44bfe7490947e69527fbc7 (patch)
treeaefc53ffe6076a8133e29c320b39ddfbc73c5c05
parent277b9cf8788f340f387e63029ad9fc12664cafff (diff)
downloadzig-4277762b742216d4dd44bfe7490947e69527fbc7.tar.gz
zig-4277762b742216d4dd44bfe7490947e69527fbc7.zip
fix windows build system
broken by 6e821078f625a03eb8b7794c983da0f7793366ab
-rw-r--r--std/os/child_process.zig8
1 files changed, 5 insertions, 3 deletions
diff --git a/std/os/child_process.zig b/std/os/child_process.zig
index 8bb8b2d7e7..ebc8a38cd1 100644
--- a/std/os/child_process.zig
+++ b/std/os/child_process.zig
@@ -650,6 +650,8 @@ fn windowsCreateCommandLine(allocator: &mem.Allocator, argv: []const []const u8)
var buf = try Buffer.initSize(allocator, 0);
defer buf.deinit();
+ var buf_stream = &io.BufferOutStream.init(&buf).stream;
+
for (argv) |arg, arg_i| {
if (arg_i != 0)
try buf.appendByte(' ');
@@ -663,18 +665,18 @@ fn windowsCreateCommandLine(allocator: &mem.Allocator, argv: []const []const u8)
switch (byte) {
'\\' => backslash_count += 1,
'"' => {
- try buf.appendByteNTimes('\\', backslash_count * 2 + 1);
+ try buf_stream.writeByteNTimes('\\', backslash_count * 2 + 1);
try buf.appendByte('"');
backslash_count = 0;
},
else => {
- try buf.appendByteNTimes('\\', backslash_count);
+ try buf_stream.writeByteNTimes('\\', backslash_count);
try buf.appendByte(byte);
backslash_count = 0;
},
}
}
- try buf.appendByteNTimes('\\', backslash_count * 2);
+ try buf_stream.writeByteNTimes('\\', backslash_count * 2);
try buf.appendByte('"');
}