Skip to content

Commit

Permalink
Fixup deprecated utf16leToUtf8Alloc usage (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
kcbanner authored Jun 15, 2024
1 parent 21a04ea commit cdcc613
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion known-folders.zig
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ pub fn getPath(allocator: std.mem.Allocator, folder: KnownFolder) Error!?[]const
)) {
std.os.windows.S_OK => {
defer funcs.CoTaskMemFree(@ptrCast(dir_path_ptr));
const global_dir = std.unicode.utf16leToUtf8Alloc(allocator, std.mem.span(dir_path_ptr)) catch |err| switch (err) {
const global_dir = std.unicode.utf16LeToUtf8Alloc(allocator, std.mem.span(dir_path_ptr)) catch |err| switch (err) {
error.UnexpectedSecondSurrogateHalf => return null,
error.ExpectedSecondSurrogateHalf => return null,
error.DanglingSurrogateHalf => return null,
Expand Down

0 comments on commit cdcc613

Please sign in to comment.