diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2023-03-01 00:34:30 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2023-03-15 10:48:13 -0700 |
| commit | 8b2d872020bf8139404d0655e5ab70792cc67873 (patch) | |
| tree | ecfe266b968cb13d860daae80275ea3df0e1e387 /lib/std/Build.zig | |
| parent | 0e078790feaf49964d7a0da3042117ebd10de13b (diff) | |
| download | zig-8b2d872020bf8139404d0655e5ab70792cc67873.tar.gz zig-8b2d872020bf8139404d0655e5ab70792cc67873.zip | |
fix std.Build.TranslateCStep
Diffstat (limited to 'lib/std/Build.zig')
| -rw-r--r-- | lib/std/Build.zig | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/std/Build.zig b/lib/std/Build.zig index ca7ddb591c..05decec36f 100644 --- a/lib/std/Build.zig +++ b/lib/std/Build.zig @@ -1453,7 +1453,7 @@ pub fn execFromStep(b: *Build, argv: []const []const u8, s: *Step, prog_node: *s const header = @ptrCast(*align(1) const Header, buf[0..@sizeOf(Header)]); const header_and_msg_len = header.bytes_len + @sizeOf(Header); if (buf.len >= header_and_msg_len) { - const body = buf[@sizeOf(Header)..]; + const body = buf[@sizeOf(Header)..][0..header.bytes_len]; switch (header.tag) { .zig_version => { if (!mem.eql(u8, builtin.zig_version_string, body)) { |
