diff options
Diffstat (limited to 'Modules/_json.c')
-rw-r--r-- | Modules/_json.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_json.c b/Modules/_json.c index 0f550c1c1f..e49d1b2f41 100644 --- a/Modules/_json.c +++ b/Modules/_json.c @@ -365,7 +365,7 @@ scanstring_unicode(PyObject *pystr, Py_ssize_t end, int strict, Py_ssize_t *next APPEND_OLD_CHUNK chunk = PyUnicode_FromKindAndData( kind, - (char*)buf + PyUnicode_KIND_SIZE(kind, end), + (char*)buf + kind * end, next - end); if (chunk == NULL) { goto bail; @@ -931,7 +931,7 @@ _match_number_unicode(PyScannerObject *s, PyObject *pystr, Py_ssize_t start, Py_ if (custom_func) { /* copy the section we determined to be a number */ numstr = PyUnicode_FromKindAndData(kind, - (char*)str + PyUnicode_KIND_SIZE(kind, start), + (char*)str + kind * start, idx - start); if (numstr == NULL) return NULL; |