diff options
| author | Scott Lagler <laglerscott@gmail.com> | 2024-10-06 14:13:43 -0400 |
|---|---|---|
| committer | Glenn Smith <glenn@vector35.com> | 2024-10-22 15:18:13 -0400 |
| commit | 7421118805997155191953874367677542369042 (patch) | |
| tree | 803b0e68861285287829d657964ca0de7f0b2ade /python/function.py | |
| parent | b6d1aed922c28193038c9e42133e32eba6cd6758 (diff) | |
fix: BasicBlockList iteration returns a new list
The culprit here is the _n class member which serves as the counter for the __next__ function. That needs to be reset when iterating through the list
Diffstat (limited to 'python/function.py')
| -rw-r--r-- | python/function.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/python/function.py b/python/function.py index c8acf287..4f01fc29 100644 --- a/python/function.py +++ b/python/function.py @@ -237,7 +237,7 @@ class BasicBlockList: return self._count.value def __iter__(self): - return self + return BasicBlockList(self._function) def __next__(self) -> 'basicblock.BasicBlock': if self._n >= len(self): |
