From abba72c03c30c8af05aacfa99cad773067e12c24 Mon Sep 17 00:00:00 2001 From: Tanner Collin Date: Tue, 6 Sep 2022 19:20:54 -0600 Subject: [PATCH] Fix Think too long result crash --- main.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index db77ffc..c1940b7 100755 --- a/main.py +++ b/main.py @@ -384,7 +384,16 @@ while True: stdscr.addstr(23, 1, '[B] Back') if think_result: - stdscr.addstr(9, 4, think_result) + for _ in range(100): + try: + stdscr.addstr(9, 4, think_result) + break + except: + think_result = think_result[:-5] + stdscr.addstr(22, 1, '') + stdscr.clrtoeol() + stdscr.addstr(23, 1, '[B] Back') + stdscr.clrtoeol() if not think_result and not think_to_send: stdscr.addstr(9, 1, 'Examples:')