From cdcc6137ed2e92096b27d394db917d1861f156b3 Mon Sep 17 00:00:00 2001 From: Casey Banner Date: Sat, 15 Jun 2024 13:12:15 -0400 Subject: [PATCH] Fixup deprecated utf16leToUtf8Alloc usage (#51) --- known-folders.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/known-folders.zig b/known-folders.zig index d85215f..d6a6e17 100644 --- a/known-folders.zig +++ b/known-folders.zig @@ -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,