From: Andrew M. Kuchling Date: Sat, 19 Jan 2008 23:44:39 +0000 (+0000) Subject: Fix off-by-one error that resulted in missed characters X-Git-Tag: v2.5.2c1~65 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0e65fe4b904b63f02709ee894d23114018c86c65;p=python Fix off-by-one error that resulted in missed characters --- diff --git a/Lib/curses/textpad.py b/Lib/curses/textpad.py index 120c5721ee..a25c3fe158 100644 --- a/Lib/curses/textpad.py +++ b/Lib/curses/textpad.py @@ -139,7 +139,7 @@ class Textbox: if stop == 0 and self.stripspaces: continue for x in range(self.maxx+1): - if self.stripspaces and x == stop: + if self.stripspaces and x > stop: break result = result + chr(ascii.ascii(self.win.inch(y, x))) if self.maxy > 0: