Fixed a crash on Windows, when trying to convert an empty string

This commit is contained in:
Olivier Teulière 2009-10-14 19:36:37 +00:00
parent df2fc7bc49
commit 79b6c0b53c

View file

@ -111,6 +111,8 @@ wchar_t *_wcstok(wchar_t *wcs, const wchar_t *delim, wchar_t **ptr)
wstring convertToWc(const string& iStr)
{
#ifdef WIN32
if (iStr.empty())
return L"";
// XXX: Assume the input is in UTF-8
return readFromUTF8(iStr.c_str(), iStr.size(), "convertToWc");
#else