From 1de8afaa0f91e48b9d59fd08a9a6aca84b95c337 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=81=8D=E5=85=AE=E6=83=9A=E5=85=AE?= <1173718158@qq.com> Date: Sun, 10 Nov 2024 22:27:33 +0800 Subject: [PATCH] fix --- cpp/LunaHook/include/stringutils.cpp | 8 ++++++-- cpp/scripts/build32.bat | 2 +- cpp/version.cmake | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/cpp/LunaHook/include/stringutils.cpp b/cpp/LunaHook/include/stringutils.cpp index 79d9069c..16d97ddc 100644 --- a/cpp/LunaHook/include/stringutils.cpp +++ b/cpp/LunaHook/include/stringutils.cpp @@ -130,11 +130,15 @@ std::optional StringToWideString(std::string_view text, UINT encod std::wstring StringToWideString(const std::string &text) { - return StringToWideString(text, CP_UTF8).value(); + if (!text.size()) + return L""; + return StringToWideString(text, CP_UTF8).value_or(L""); } std::wstring StringToWideString(std::string_view text) { - return StringToWideString(text, CP_UTF8).value(); + if (!text.size()) + return L""; + return StringToWideString(text, CP_UTF8).value_or(L""); } std::optional StringToWideString(const char *text, UINT encoding) diff --git a/cpp/scripts/build32.bat b/cpp/scripts/build32.bat index cf75912e..f8d02ab7 100644 --- a/cpp/scripts/build32.bat +++ b/cpp/scripts/build32.bat @@ -1,5 +1,5 @@ python fetchwebview2.py cmake ..\CMakeLists.txt -G "Visual Studio 17 2022" -A win32 -T host=x86 -B ..\build\x86 cmake --build ..\build\x86 --config Release --target ALL_BUILD -j 14 -copy .\builds\_x86\shareddllproxy32.exe ..\..\py\files\plugins +copy ..\builds\_x86\shareddllproxy32.exe ..\..\py\files\plugins robocopy ..\builds\_x86 ..\..\py\files\plugins\DLL32 \ No newline at end of file diff --git a/cpp/version.cmake b/cpp/version.cmake index f9a4a195..898b16d0 100644 --- a/cpp/version.cmake +++ b/cpp/version.cmake @@ -1,7 +1,7 @@ set(VERSION_MAJOR 5) set(VERSION_MINOR 57) -set(VERSION_PATCH 1) +set(VERSION_PATCH 2) set(VERSION_REVISION 0) add_definitions(-DVERSION_MAJOR=${VERSION_MAJOR}) add_definitions(-DVERSION_MINOR=${VERSION_MINOR})