git-svn-id: svn://db.shs.com.ru/pip@906 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5

This commit is contained in:
2020-03-06 07:36:25 +00:00
parent d1c41379cb
commit f97da76b4e

View File

@@ -79,7 +79,7 @@ ushort charFromCodepage(const char * c, int size, const char * codepage, int * t
#endif
wchar_t wc(0);
mbtowc(0, 0, 0); // reset mbtowc
ret = mbtowc(&wc, c, sizeof(ushort));
ret = mbtowc(&wc, c, size);
if (ret < 1 || ret > (int)sizeof(ushort)) return 0;
else return wc;
return c[0];