mirror of
https://github.com/python/cpython.git
synced 2025-10-17 20:28:43 +00:00
Issue 16398: One more assertion for good measure.
This commit is contained in:
parent
56265564ff
commit
3a9ae7fd98
1 changed files with 2 additions and 0 deletions
|
@ -484,6 +484,8 @@ _deque_rotate(dequeobject *deque, Py_ssize_t n)
|
|||
if (m > BLOCKLEN - 1 - deque->rightindex)
|
||||
m = BLOCKLEN - 1 - deque->rightindex;
|
||||
assert (m > 0);
|
||||
assert (deque->leftblock != deque->rightblock ||
|
||||
deque->leftindex + m < deque->rightindex + 1);
|
||||
memcpy(&deque->rightblock->data[deque->rightindex + 1],
|
||||
&deque->leftblock->data[deque->leftindex],
|
||||
m * sizeof(PyObject *));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue