authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2018-05-11 23:04:41-04:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2018-05-11 23:04:41-04:00
log4277762b742216d4dd44bfe7490947e69527fbc7
treeaefc53ffe6076a8133e29c320b39ddfbc73c5c05
parent277b9cf8788f340f387e63029ad9fc12664cafff

fix windows build system

broken by 6e821078f625a03eb8b7794c983da0f7793366ab

1 files changed, 5 insertions(+), 3 deletions(-)

std/os/child_process.zig+5-3
...@@ -650,6 +650,8 @@ fn windowsCreateCommandLine(allocator: &mem.Allocator, argv: []const []const u8)...@@ -650,6 +650,8 @@ fn windowsCreateCommandLine(allocator: &mem.Allocator, argv: []const []const u8)
650 var buf = try Buffer.initSize(allocator, 0);650 var buf = try Buffer.initSize(allocator, 0);
651 defer buf.deinit();651 defer buf.deinit();
652652
653 var buf_stream = &io.BufferOutStream.init(&buf).stream;
654
653 for (argv) |arg, arg_i| {655 for (argv) |arg, arg_i| {
654 if (arg_i != 0)656 if (arg_i != 0)
655 try buf.appendByte(' ');657 try buf.appendByte(' ');
...@@ -663,18 +665,18 @@ fn windowsCreateCommandLine(allocator: &mem.Allocator, argv: []const []const u8)...@@ -663,18 +665,18 @@ fn windowsCreateCommandLine(allocator: &mem.Allocator, argv: []const []const u8)
663 switch (byte) {665 switch (byte) {
664 '\\' => backslash_count += 1,666 '\\' => backslash_count += 1,
665 '"' => {667 '"' => {
666 try buf.appendByteNTimes('\\', backslash_count * 2 + 1);668 try buf_stream.writeByteNTimes('\\', backslash_count * 2 + 1);
667 try buf.appendByte('"');669 try buf.appendByte('"');
668 backslash_count = 0;670 backslash_count = 0;
669 },671 },
670 else => {672 else => {
671 try buf.appendByteNTimes('\\', backslash_count);673 try buf_stream.writeByteNTimes('\\', backslash_count);
672 try buf.appendByte(byte);674 try buf.appendByte(byte);
673 backslash_count = 0;675 backslash_count = 0;
674 },676 },
675 }677 }
676 }678 }
677 try buf.appendByteNTimes('\\', backslash_count * 2);679 try buf_stream.writeByteNTimes('\\', backslash_count * 2);
678 try buf.appendByte('"');680 try buf.appendByte('"');
679 }681 }
680682