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)
650650 var buf = try Buffer.initSize(allocator, 0);
651651 defer buf.deinit();
652652
653 var buf_stream = &io.BufferOutStream.init(&buf).stream;
654
653655 for (argv) |arg, arg_i| {
654656 if (arg_i != 0)
655657 try buf.appendByte(' ');
......@@ -663,18 +665,18 @@ fn windowsCreateCommandLine(allocator: &mem.Allocator, argv: []const []const u8)
663665 switch (byte) {
664666 '\\' => backslash_count += 1,
665667 '"' => {
666 try buf.appendByteNTimes('\\', backslash_count * 2 + 1);
668 try buf_stream.writeByteNTimes('\\', backslash_count * 2 + 1);
667669 try buf.appendByte('"');
668670 backslash_count = 0;
669671 },
670672 else => {
671 try buf.appendByteNTimes('\\', backslash_count);
673 try buf_stream.writeByteNTimes('\\', backslash_count);
672674 try buf.appendByte(byte);
673675 backslash_count = 0;
674676 },
675677 }
676678 }
677 try buf.appendByteNTimes('\\', backslash_count * 2);
679 try buf_stream.writeByteNTimes('\\', backslash_count * 2);
678680 try buf.appendByte('"');
679681 }
680682