mirror of https://github.com/python/cpython
Issue #6093: Fix off-by-one error in locale.strxfrm.
This commit is contained in:
parent
eccb2ce3c0
commit
db1c399fe0
|
@ -54,6 +54,11 @@ Library
|
||||||
now it does. This also means getfp method now returns the real fp.
|
now it does. This also means getfp method now returns the real fp.
|
||||||
|
|
||||||
|
|
||||||
|
Extension Modules
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
- Issue #6093: Fix off-by-one error in locale.strxfrm.
|
||||||
|
|
||||||
Tests
|
Tests
|
||||||
-----
|
-----
|
||||||
|
|
||||||
|
|
|
@ -314,7 +314,7 @@ PyLocale_strxfrm(PyObject* self, PyObject* args)
|
||||||
PyErr_NoMemory();
|
PyErr_NoMemory();
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
n2 = wcsxfrm(buf, s, n2);
|
n2 = wcsxfrm(buf, s, n2+1);
|
||||||
}
|
}
|
||||||
result = PyUnicode_FromWideChar(buf, n2);
|
result = PyUnicode_FromWideChar(buf, n2);
|
||||||
exit:
|
exit:
|
||||||
|
|
Loading…
Reference in New Issue