Mercurial > cpython-lru_cache-weakref
diff Modules/arraymodule.c @ 58563:2b08de9a1fa0
Merged revisions 77821 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r77821 | mark.dickinson | 2010-01-29 17:11:39 +0000 (Fri, 29 Jan 2010) | 3 lines
Issue #7788: Fix a crash produced by deleting a list slice with huge
step value. Patch by Marcin Bachry.
........
| author | Mark Dickinson <dickinsm@gmail.com> |
|---|---|
| date | Fri, 29 Jan 2010 17:27:24 +0000 |
| parents | 7b603680bf29 |
| children | 3baabd1d68a2 |
line wrap: on
line diff
--- a/Modules/arraymodule.c Fri Jan 29 11:46:31 2010 +0000 +++ b/Modules/arraymodule.c Fri Jan 29 17:27:24 2010 +0000 @@ -2199,8 +2199,9 @@ } else if (needed == 0) { /* Delete slice */ - Py_ssize_t cur, i; - + size_t cur; + Py_ssize_t i; + if (step < 0) { stop = start + 1; start = stop + step * (slicelength - 1) - 1;
