Skip to content

Commit 617957c

Browse files
committed
fix
1 parent ef00a26 commit 617957c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/mingw/src/files/FileSystemMingw.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@ private typealias PathCchRemoveFileSpecFunc = CPointer<CFunction<(PWSTR, size_t)
5555

5656
@OptIn(ExperimentalNativeApi::class)
5757
private val kernelBaseDll = LoadLibraryW("kernelbase.dll") ?: run {
58-
terminateWithUnhandledException(RuntimeException("kernelbase_dll is not supported: ${formatWin32ErrorMessage()}"))
58+
terminateWithUnhandledException(RuntimeException("kernelbase.dll is not supported: ${formatWin32ErrorMessage()}"))
5959
}
6060

6161
@OptIn(ExperimentalNativeApi::class)
6262
private fun <T : CPointed> getProcAddressOrFailed(module: HMODULE, name: String): CPointer<T> {
63-
val pointer = GetProcAddress(kernelBaseDll, "PathCchRemoveFileSpec") ?: terminateWithUnhandledException(
63+
val pointer = GetProcAddress(kernelBaseDll, name) ?: terminateWithUnhandledException(
6464
UnsupportedOperationException("Failed to get proc: $name: ${formatWin32ErrorMessage()}"),
6565
)
6666
return pointer.reinterpret()

0 commit comments

Comments
 (0)