Fix compile warning on Linux
This commit is contained in:
parent
abeba45644
commit
8be8b62d83
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue