Sending this into chat or using as macro crashes server.
/run SendChatMessage("WOW", "WHISPER", nil, "\240\146\140\165\240\146\145\163\240\146\145\169\240\147\139\141\240\147\139\136\240\147\137\161\240\146\140\165\240\146\145\163\240\146\145\169\240\147\139\141\240\147\139\136\240\147\137\161")
Temporary fix:
src/shared/Utilities/Util.cpp
Line 330 , change to
bool Utf8toWStr(char const* utf8str, size_t csize, wchar_t* wstr, size_t& wsize)
{
try
{
size_t len = utf8::distance(utf8str, utf8str + csize);
if (len > wsize)
{
if (wsize > 0)
{
wstr[0] = L'\0';
}
wsize = 0;
return false;
}
wsize = len;
utf8::utf8to16(utf8str, utf8str + csize, wstr);
wstr[len] = L'\0';
}
catch (std::exception)
{
wchar_t const* errorMessage = L"An error occurred converting string from UTF-8 to WStr";
size_t errorMessageLength = wcslen(errorMessage);
if (wsize >= errorMessageLength)
{
wcscpy(wstr, errorMessage);
wsize = wcslen(wstr);
}
else if (wsize > 0)
{
wstr[0] = L'\0';
wsize = 0;
}
else
wsize = 0;
return false;
}
return true;
}
Recommended Comments
There are no comments to display.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now