mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-04-27 18:51:44 +03:00
std.Io.Threaded: fix Windows env var mapping
Windows environment variables are case-insensitive, so the special Wtf16 comparison needs to be used, or PATH/PATHEXT might be missed.
This commit is contained in:
@@ -12661,7 +12661,7 @@ const WindowsEnvironStrings = struct {
|
||||
|
||||
inline for (@typeInfo(WindowsEnvironStrings).@"struct".fields) |field| {
|
||||
const field_name_w = comptime std.unicode.wtf8ToWtf16LeStringLiteral(field.name);
|
||||
if (std.mem.eql(u16, key_w, field_name_w)) @field(result, field.name) = value_w;
|
||||
if (std.os.windows.eqlIgnoreCaseWtf16(key_w, field_name_w)) @field(result, field.name) = value_w;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user