Commit 8d5da55588

Andrew Kelley <andrew@ziglang.org>
2023-12-05 07:15:53
std.Target.Query: fix regression with windows os version range
somebody left a landmine here without even a comment to warn about it
1 parent 77420af
Changed files (1)
lib
std
Target
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});
             },
         }
     }