From 8d5da5558827d9152dc8453c87c41ac6519f8a05 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Mon, 4 Dec 2023 23:15:53 -0700 Subject: [PATCH] std.Target.Query: fix regression with windows os version range somebody left a landmine here without even a comment to warn about it --- lib/std/Target/Query.zig | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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}); }, } }