diff options
Diffstat (limited to 'Modules/collectionsmodule.c')
-rw-r--r-- | Modules/collectionsmodule.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/collectionsmodule.c b/Modules/collectionsmodule.c index cf474f7..fc30c99 100644 --- a/Modules/collectionsmodule.c +++ b/Modules/collectionsmodule.c @@ -770,6 +770,7 @@ dequeiter_next(dequeiterobject *it) if (it->len != it->deque->len) { it->len = -1; /* Make this state sticky */ + it->counter = 0; PyErr_SetString(PyExc_RuntimeError, "deque changed size during iteration"); return NULL; @@ -860,6 +861,7 @@ dequereviter_next(dequeiterobject *it) if (it->len != it->deque->len) { it->len = -1; /* Make this state sticky */ + it->counter = 0; PyErr_SetString(PyExc_RuntimeError, "deque changed size during iteration"); return NULL; |