- Merged 2 fixes from MP Branch

o VFS: don't convert empty strings
o Updated _PolishText.cpp

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@3109 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2009-07-14 08:37:08 +00:00
parent 826340978a
commit 5a9f0b16b1
2 changed files with 9 additions and 1 deletions
+1 -1
View File
@@ -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",
+8
View File
@@ -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;
}