]> git.ipfire.org Git - thirdparty/xz.git/commitdiff
tuklib_physmem: Fix Unicode builds on Windows.
authorLasse Collin <lasse.collin@tukaani.org>
Wed, 28 Sep 2022 09:20:41 +0000 (12:20 +0300)
committerLasse Collin <lasse.collin@tukaani.org>
Thu, 29 Sep 2022 13:54:39 +0000 (16:54 +0300)
Thanks to ArSaCiA Game.

src/common/tuklib_physmem.c

index 4053ad006a645be28182f920d108b109dcf04ef8..a1bccb2f67530bf1d28655515996df493971e25d 100644 (file)
@@ -84,7 +84,7 @@ tuklib_physmem(void)
                // supports reporting values greater than 4 GiB. To keep the
                // code working also on older Windows versions, use
                // GlobalMemoryStatusEx() conditionally.
-               HMODULE kernel32 = GetModuleHandle("kernel32.dll");
+               HMODULE kernel32 = GetModuleHandle(TEXT("kernel32.dll"));
                if (kernel32 != NULL) {
                        typedef BOOL (WINAPI *gmse_type)(LPMEMORYSTATUSEX);
                        gmse_type gmse = (gmse_type)GetProcAddress(