diff options
author | Justin Blanchard <UncombedCoconut@gmail.com> | 2019-08-29 03:36:15 -0400 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2019-08-29 10:36:15 +0300 |
commit | 122376df550b71dd3bec0513c7483cc1714212fa (patch) | |
tree | 5f52d8443c43ab36004a25a3e8c957b9df7c218d /Modules | |
parent | e64f948e762a6b9fd02e2902ccf42438df6fcb61 (diff) | |
download | cpython-git-122376df550b71dd3bec0513c7483cc1714212fa.tar.gz |
bpo-37372: Fix error unpickling datetime.time objects from Python 2 with seconds>=24. (GH-14307)
Diffstat (limited to 'Modules')
-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 56eaccdf17..8f4fa21da1 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) { |