diff --git a/GUI/host/util.cpp b/GUI/host/util.cpp index fb9ee2b..66ae7cb 100644 --- a/GUI/host/util.cpp +++ b/GUI/host/util.cpp @@ -313,7 +313,7 @@ namespace Util { wchar_t* end = text.data() + text.size(); for (int length = text.size() / 3; length > 6; --length) - if (wcsncmp(end - length * 3, end - length * 2, length) == 0 && wcsncmp(end - length * 3, end - length * 1, length) == 0) + if (memcmp(end - length * 3, end - length * 2, length * sizeof(wchar_t)) == 0 && memcmp(end - length * 3, end - length * 1, length * sizeof(wchar_t)) == 0) return RemoveRepetition(text = std::wstring(end - length, length)), true; return false; }