aboutsummaryrefslogtreecommitdiff
path: root/lib/std/Target/Query.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2023-12-04 23:15:53 -0700
committerAndrew Kelley <andrew@ziglang.org>2024-01-01 17:51:18 -0700
commit8d5da5558827d9152dc8453c87c41ac6519f8a05 (patch)
tree5615d983aef1d1bc4b46608c54068b3f8bc92cb9 /lib/std/Target/Query.zig
parent77420af9d01b1932a583fdcbfa169f2eb2b7c221 (diff)
downloadzig-8d5da5558827d9152dc8453c87c41ac6519f8a05.tar.gz
zig-8d5da5558827d9152dc8453c87c41ac6519f8a05.zip
std.Target.Query: fix regression with windows os version range
somebody left a landmine here without even a comment to warn about it
Diffstat (limited to 'lib/std/Target/Query.zig')
-rw-r--r--lib/std/Target/Query.zig4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/std/Target/Query.zig b/lib/std/Target/Query.zig
index 1deff022cc..10130e03bb 100644
--- a/lib/std/Target/Query.zig
+++ b/lib/std/Target/Query.zig
@@ -460,7 +460,9 @@ pub fn zigTriple(self: Query, allocator: Allocator) Allocator.Error![]u8 {
try formatVersion(v, result.writer());
},
.windows => |v| {
- try result.writer().print("...{s}", .{v});
+ // This is counting on a custom format() function defined on `WindowsVersion`
+ // to add a prefix '.' and make there be a total of three dots.
+ try result.writer().print("..{s}", .{v});
},
}
}