mirror of
git://git.savannah.nongnu.org/eliot.git
synced 2025-02-11 20:48:40 +01:00
Fixed a crash on Windows, when trying to convert an empty string
This commit is contained in:
parent
df2fc7bc49
commit
79b6c0b53c
1 changed files with 2 additions and 0 deletions
|
@ -111,6 +111,8 @@ wchar_t *_wcstok(wchar_t *wcs, const wchar_t *delim, wchar_t **ptr)
|
||||||
wstring convertToWc(const string& iStr)
|
wstring convertToWc(const string& iStr)
|
||||||
{
|
{
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
|
if (iStr.empty())
|
||||||
|
return L"";
|
||||||
// XXX: Assume the input is in UTF-8
|
// XXX: Assume the input is in UTF-8
|
||||||
return readFromUTF8(iStr.c_str(), iStr.size(), "convertToWc");
|
return readFromUTF8(iStr.c_str(), iStr.size(), "convertToWc");
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Add table
Reference in a new issue