]> granicus.if.org Git - python/commitdiff
Fix off-by-one error that resulted in missed characters
authorAndrew M. Kuchling <amk@amk.ca>
Sat, 19 Jan 2008 23:44:39 +0000 (23:44 +0000)
committerAndrew M. Kuchling <amk@amk.ca>
Sat, 19 Jan 2008 23:44:39 +0000 (23:44 +0000)
Lib/curses/textpad.py

index 120c5721ee73fcd3ee07fb9e19d3ba50eeeecbb0..a25c3fe158c07ced45d522c3164e3791448b9a93 100644 (file)
@@ -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: