From d896f14d921c5328013b4f09e8ba6f27b175243d 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, 17 Nov 2024 13:30:36 +0800 Subject: [PATCH] . --- cpp/LunaHook/LunaHook/engine64/yuzu.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/cpp/LunaHook/LunaHook/engine64/yuzu.cpp b/cpp/LunaHook/LunaHook/engine64/yuzu.cpp index 9e90cfee..14234591 100644 --- a/cpp/LunaHook/LunaHook/engine64/yuzu.cpp +++ b/cpp/LunaHook/LunaHook/engine64/yuzu.cpp @@ -363,7 +363,8 @@ namespace void F0100F6A00A684000(TextBuffer *buffer, HookParam *hp) { auto s = buffer->strA(); - std::sregex_token_iterator it(s.begin(), s.end(), std::regex("(?=@.)"), -1); + auto r = std::regex("(?=@.)"); + std::sregex_token_iterator it(s.begin(), s.end(), r, -1); std::sregex_token_iterator end; std::vector parts(it, end); s = ""; @@ -423,7 +424,8 @@ namespace void F01006590155AC000(TextBuffer *buffer, HookParam *hp) { auto s = buffer->strA(); - std::sregex_token_iterator it(s.begin(), s.end(), std::regex("(?=@.)"), -1); + auto r = std::regex("(?=@.)"); + std::sregex_token_iterator it(s.begin(), s.end(), r, -1); std::sregex_token_iterator end; std::vector parts(it, end); @@ -502,8 +504,8 @@ namespace static std::string readString_savedSentence = ""; static bool readString_playerNameFlag = false; static std::string readString_playerName = u8"ラピス"; - - std::sregex_token_iterator it(s.begin(), s.end(), std::regex("(?=@.)"), -1); + auto r = std::regex("(?=@.)"); + std::sregex_token_iterator it(s.begin(), s.end(), r, -1); std::sregex_token_iterator end; std::vector parts(it, end);