Skip to content

Commit 043d49e

Browse files
authored
Fix passing flags in single-file tests for NativeLibrary.TryLoad (#115173)
1 parent b107e73 commit 043d49e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/installer/tests/Assets/Projects/HelloWorld/LoadNativeLibrary.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public static void PInvoke(DllImportSearchPath? flags)
4040
public static void UseAPI(DllImportSearchPath? flags)
4141
{
4242
string name = GetLibraryName(flags);
43-
bool success = NativeLibrary.TryLoad(name, typeof(LoadNativeLibrary).Assembly, null, out _);
43+
bool success = NativeLibrary.TryLoad(name, typeof(LoadNativeLibrary).Assembly, flags, out _);
4444
Console.WriteLine($"Loading {name} via NativeLibrary API (flags: {(flags.HasValue ? flags : "default")}) {(success ? "succeeded" : "failed")}");
4545
}
4646

0 commit comments

Comments
 (0)