diff --git a/Utils/_PolishText.cpp b/Utils/_PolishText.cpp index 2d107c36..6e2a8811 100644 --- a/Utils/_PolishText.cpp +++ b/Utils/_PolishText.cpp @@ -3298,7 +3298,7 @@ STR16 AimPopUpText[] = //If you try to hire more mercs than game can support - L"Masz już pełny zespół 18 najemników.", + L"You have a full team of mercs already.", L"Nagrana wiadomość", L"Wiadomość zapisana", diff --git a/VFS/utf8string.cpp b/VFS/utf8string.cpp index e03250fa..743a2cc7 100644 --- a/VFS/utf8string.cpp +++ b/VFS/utf8string.cpp @@ -203,6 +203,10 @@ std::string utf8string::as_utf8(utf8string const& str) } std::string utf8string::as_utf8(std::wstring const& str) { + if(str.length() == 0) + { + return ""; + } #if 0 std::string s; utf8::utf16to8(str.begin(), str.end(), std::back_inserter(s)); @@ -224,6 +228,10 @@ std::string utf8string::as_utf8(const wchar_t* str, unsigned int strlength) { len = wcslen(str); } + if(len == 0) + { + return ""; + } utf8::utf16to8(str,str+len,std::back_inserter(s)); return s; }