Browse Source

Missing calling convention was causing random crashes later

Source commit: b68e9881e2da3424df429161e6d98a774fdbc495
Martin Prikryl 10 months ago
parent
commit
6bc0a0142f
1 changed files with 1 additions and 1 deletions
  1. 1 1
      source/core/Common.cpp

+ 1 - 1
source/core/Common.cpp

@@ -3157,7 +3157,7 @@ UnicodeString __fastcall WindowsProductName()
     HMODULE WinBrandLib = LoadLibrary(L"winbrand.dll");
     if (WinBrandLib != NULL)
     {
-      typedef LPWSTR (* TBrandingFormatString)(LPCWSTR);
+      typedef LPWSTR WINAPI (* TBrandingFormatString)(LPCWSTR);
       TBrandingFormatString BrandingFormatString =
         reinterpret_cast<TBrandingFormatString>(GetProcAddress(WinBrandLib, "BrandingFormatString"));
       if (BrandingFormatString != NULL)