diff --git a/Misc/NEWS b/Misc/NEWS index df4a09b9557..3d9015770d2 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -284,6 +284,9 @@ Core and Builtins Library ------- +- Issue #13461: Fix a crash in the TextIOWrapper.tell method on 64-bit + platforms. Patch by Yogesh Chaudhari. + - Issue #18681: Fix a NameError in importlib.reload() (noticed by Weizhao Li). - Issue #14323: Expanded the number of digits in the coefficients for the diff --git a/Modules/_io/textio.c b/Modules/_io/textio.c index 7b8de90020e..2db37d3fbe8 100644 --- a/Modules/_io/textio.c +++ b/Modules/_io/textio.c @@ -2368,7 +2368,7 @@ textiowrapper_tell(textio *self, PyObject *args) while (input < input_end) { Py_ssize_t n; - DECODER_DECODE(input, 1, n); + DECODER_DECODE(input, (Py_ssize_t)1, n); /* We got n chars for 1 byte */ chars_decoded += n; cookie.bytes_to_feed += 1;