From fdc31321268214fbb2b0832b0d269cea56639e98 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Tue, 10 Dec 2019 13:21:37 -0500 Subject: [PATCH] fix windows dynamic lib loading test --- lib/std/dynamic_library.zig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/std/dynamic_library.zig b/lib/std/dynamic_library.zig index 347491a44c..2132f03bd0 100644 --- a/lib/std/dynamic_library.zig +++ b/lib/std/dynamic_library.zig @@ -283,7 +283,8 @@ pub const WindowsDynLib = struct { pub fn openW(path_w: [*:0]const u16) !WindowsDynLib { return WindowsDynLib{ - .dll = try windows.LoadLibraryW(path_w), + // + 4 to skip over the \??\ + .dll = try windows.LoadLibraryW(path_w + 4), }; }