Fix unicode_aswidechar() for 4b unicode and 2b wchar_t (AIX).

This commit is contained in:
Georg Brandl 2014-10-01 19:15:11 +02:00
parent 51c116223e
commit ff3e5e3779
2 changed files with 7 additions and 1 deletions

View file

@ -1267,7 +1267,7 @@ unicode_aswidechar(PyUnicodeObject *unicode,
Py_ssize_t nchar;
u = PyUnicode_AS_UNICODE(unicode);
uend = u + PyUnicode_GET_SIZE(u);
uend = u + PyUnicode_GET_SIZE(unicode);
if (w != NULL) {
worig = w;
wend = w + size;