Commit b606d45f authored by Raymond Hettinger's avatar Raymond Hettinger

Issue #21868: Prevent turtle crash due to invalid undo buffer size.

parent e2d1e64a
......@@ -2499,7 +2499,7 @@ class RawTurtle(TPen, TNavigator):
Example (for a Turtle instance named turtle):
>>> turtle.setundobuffer(42)
"""
if size is None:
if size is None or size <= 0:
self.undobuffer = None
else:
self.undobuffer = Tbuffer(size)
......
......@@ -235,6 +235,7 @@ Ingrid Cheung
Albert Chin-A-Young
Adal Chiriliuc
Matt Chisholm
Lita Cho
Anders Chrigström
Tom Christiansen
Renee Chu
......
......@@ -16,6 +16,9 @@ Library
- Issue #22017: Correct reference counting errror in the initialization of the
_warnings module.
- Issue #21868: Prevent turtle crash when undo buffer set to a value less
than one.
- Issue #21044: tarfile.open() now handles fileobj with an integer 'name'
attribute. Based on patch by Martin Panter.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment