diff options
author | K.Takata <kentkt@csc.jp> | 2022-02-12 11:18:37 +0000 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-02-12 11:18:37 +0000 |
commit | d68b2fc034fa3c824e0d4d53745cfe9eb8c5ecd6 (patch) | |
tree | 8e4c621d0b2d4ea58df053cb0a1432c91d502390 /src/gui_dwrite.cpp | |
parent | 18f7593e57730e6de7c2cf47c87e44252cfbb61e (diff) |
patch 8.2.4354: dynamic loading of libsodium not handled properlyv8.2.4354
Problem: Dynamic loading of libsodium not handled properly.
Solution: Fix has() and :version. Show an error message when loading fails.
Fix memory leaks. (Ken Takata, closes #9754)
Diffstat (limited to 'src/gui_dwrite.cpp')
-rw-r--r-- | src/gui_dwrite.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui_dwrite.cpp b/src/gui_dwrite.cpp index 83acdab1ad..62d23e7277 100644 --- a/src/gui_dwrite.cpp +++ b/src/gui_dwrite.cpp @@ -59,7 +59,7 @@ #endif #ifdef DYNAMIC_DIRECTX -extern "C" HINSTANCE vimLoadLib(char *name); +extern "C" HINSTANCE vimLoadLib(const char *name); typedef int (WINAPI *PGETUSERDEFAULTLOCALENAME)(LPWSTR, int); typedef HRESULT (WINAPI *PD2D1CREATEFACTORY)(D2D1_FACTORY_TYPE, @@ -1212,8 +1212,8 @@ DWrite_Init(void) { #ifdef DYNAMIC_DIRECTX // Load libraries. - hD2D1DLL = vimLoadLib(const_cast<char*>("d2d1.dll")); - hDWriteDLL = vimLoadLib(const_cast<char*>("dwrite.dll")); + hD2D1DLL = vimLoadLib("d2d1.dll"); + hDWriteDLL = vimLoadLib("dwrite.dll"); if (hD2D1DLL == NULL || hDWriteDLL == NULL) { DWrite_Final(); |