Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 01963e6 commit 854e76eCopy full SHA for 854e76e
2 files changed
Lib/turtle.py
@@ -2594,7 +2594,7 @@ def setundobuffer(self, size):
2594
Example (for a Turtle instance named turtle):
2595
>>> turtle.setundobuffer(42)
2596
"""
2597
- if size is None:
+ if size is None or size <= 0:
2598
self.undobuffer = None
2599
else:
2600
self.undobuffer = Tbuffer(size)
Misc/NEWS
@@ -30,6 +30,8 @@ Library
30
- Issue #21044: tarfile.open() now handles fileobj with an integer 'name'
31
attribute. Based on patch by Martin Panter.
32
33
+- Issue #21867: Prevent turtle crash due to invalid undo buffer size.
34
+
35
- Issue #19076: Don't pass the redundant 'file' argument to self.error().
36
37
- Issue #21942: Fixed source file viewing in pydoc's server mode on Windows.
0 commit comments