Fix compile warning on Linux

This commit is contained in:
jleveque 2013-11-19 23:55:37 -06:00 committed by Olly Betts
commit 8be8b62d83

View file

@ -18,7 +18,7 @@ wchar_t* str2wstr(const char *str, int len)
if (str==0 || len<1) return 0;
p=(wchar *)malloc((len+1)*sizeof(wchar_t));
if (p==0) return 0;
if (mbstowcs(p, str, len)==-1)
if (mbstowcs(p, str, len)==(size_t)-1)
{
free(p);
return 0;