diff options
author | Andrew M. Kuchling <amk@amk.ca> | 2005-06-02 00:10:04 +0000 |
---|---|---|
committer | Andrew M. Kuchling <amk@amk.ca> | 2005-06-02 00:10:04 +0000 |
commit | 8e9fab2dd9f61e3e8c606907942c8e420a76a408 (patch) | |
tree | f45fa45b25ce5a1d772e4dd3492aa17c1d965924 /Lib/curses | |
parent | c04064bbad6856b633a5a048b963027b89f974e0 (diff) | |
download | cpython-8e9fab2dd9f61e3e8c606907942c8e420a76a408.tar.gz |
[Bug #1152762] Ensure _end_of_line() returns an x-coordinate that's within the text box
Diffstat (limited to 'Lib/curses')
-rw-r--r-- | Lib/curses/textpad.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/curses/textpad.py b/Lib/curses/textpad.py index 28d78dd5cd..120c5721ee 100644 --- a/Lib/curses/textpad.py +++ b/Lib/curses/textpad.py @@ -53,7 +53,7 @@ class Textbox: last = self.maxx while 1: if ascii.ascii(self.win.inch(y, last)) != ascii.SP: - last = last + 1 + last = min(self.maxx, last+1) break elif last == 0: break |