From 0e65fe4b904b63f02709ee894d23114018c86c65 Mon Sep 17 00:00:00 2001 From: "Andrew M. Kuchling" Date: Sat, 19 Jan 2008 23:44:39 +0000 Subject: [PATCH] Fix off-by-one error that resulted in missed characters --- Lib/curses/textpad.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: -- 2.50.1