From c8cfb1f470349d2e1997bfc69cbf26921eb69573 Mon Sep 17 00:00:00 2001 From: Maurice Heumann Date: Sun, 4 Dec 2022 19:59:35 +0100 Subject: [PATCH] Small fixes --- src/client/component/arxan.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/client/component/arxan.cpp b/src/client/component/arxan.cpp index a578df85..f4a44654 100644 --- a/src/client/component/arxan.cpp +++ b/src/client/component/arxan.cpp @@ -133,7 +133,7 @@ namespace arxan return false; } - std::wstring_view path(string.Buffer, string.Length / sizeof(string.Buffer[0])); + const std::wstring_view path(string.Buffer, string.Length / sizeof(string.Buffer[0])); bool modified = false; for (const auto& keyword : evil_keywords) @@ -173,7 +173,7 @@ namespace arxan std::string_view str_view(str, length); std::wstring wstr(str_view.begin(), str_view.end()); - if (!remove_evil_keywords_from_string(&wstr[0], wstr.size())) + if (!remove_evil_keywords_from_string(wstr.data(), wstr.size())) { return false; } @@ -190,7 +190,7 @@ namespace arxan std::wstring wstr{}; wstr.resize(max_count); - const auto res = GetWindowTextW(wnd, &wstr[0], max_count); + const auto res = GetWindowTextW(wnd, wstr.data(), max_count); if (res) { remove_evil_keywords_from_string(wstr.data(), res);