Fix WindowsDynLib.openW trying to strip the \??\ prefix when it does not exist
parent
0369b65082
commit
baa075ac8c
|
@ -338,9 +338,14 @@ pub const WindowsDynLib = struct {
|
|||
}
|
||||
|
||||
pub fn openW(path_w: [*:0]const u16) !WindowsDynLib {
|
||||
return WindowsDynLib{
|
||||
var offset: usize = 0;
|
||||
if (path_w[0] == '\\' and path_w[1] == '?' and path_w[2] == '?' and path_w[3] == '\\') {
|
||||
// + 4 to skip over the \??\
|
||||
.dll = try windows.LoadLibraryW(path_w + 4),
|
||||
offset = 4;
|
||||
}
|
||||
|
||||
return WindowsDynLib{
|
||||
.dll = try windows.LoadLibraryW(path_w + offset),
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue