diff options
author | Justin Blanchard <UncombedCoconut@gmail.com> | 2019-08-29 07:36:15 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2019-08-29 07:36:15 (GMT) |
commit | 122376df550b71dd3bec0513c7483cc1714212fa (patch) | |
tree | 5f52d8443c43ab36004a25a3e8c957b9df7c218d /Modules/_datetimemodule.c | |
parent | e64f948e762a6b9fd02e2902ccf42438df6fcb61 (diff) | |
download | cpython-122376df550b71dd3bec0513c7483cc1714212fa.zip cpython-122376df550b71dd3bec0513c7483cc1714212fa.tar.gz cpython-122376df550b71dd3bec0513c7483cc1714212fa.tar.bz2 |
bpo-37372: Fix error unpickling datetime.time objects from Python 2 with seconds>=24. (GH-14307)
Diffstat (limited to 'Modules/_datetimemodule.c')
-rw-r--r-- | Modules/_datetimemodule.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_datetimemodule.c b/Modules/_datetimemodule.c index 56eaccd..8f4fa21 100644 --- a/Modules/_datetimemodule.c +++ b/Modules/_datetimemodule.c @@ -4078,7 +4078,7 @@ time_new(PyTypeObject *type, PyObject *args, PyObject *kw) return NULL; } if (PyUnicode_GET_LENGTH(state) == _PyDateTime_TIME_DATASIZE && - (0x7F & PyUnicode_READ_CHAR(state, 2)) < 24) + (0x7F & PyUnicode_READ_CHAR(state, 0)) < 24) { state = PyUnicode_AsLatin1String(state); if (state == NULL) { |