Skip to content

Commit 2501072

Browse files
committed
Make a copy of the set to iterate over, not the original set we will be removing items from
1 parent 1d71251 commit 2501072

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

adafruit_bitmap_font/bdf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def load_glyphs(self, code_points):
9797
remaining = code_points
9898
else:
9999
remaining = set(code_points)
100-
for code_point in remaining:
100+
for code_point in remaining.copy():
101101
if code_point in self._glyphs and self._glyphs[code_point]:
102102
remaining.remove(code_point)
103103
if not remaining:

0 commit comments

Comments
 (0)