From de85deb48d2cea9fa7d0eec2524c92ffd5eaf385 Mon Sep 17 00:00:00 2001 From: Jeremy Saklad Date: Sat, 19 Jun 2021 08:02:07 -0500 Subject: [PATCH] Fix crash due to terminal overflow The program will now scroll the screen when outputting intermediate solutions without sufficient space, rather than crashing. --- Bone Market Solver.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Bone Market Solver.py b/Bone Market Solver.py index 3253284..3787e0a 100644 --- a/Bone Market Solver.py +++ b/Bone Market Solver.py @@ -2278,6 +2278,8 @@ def main(): if not args.verbose: def WrappedSolve(stdscr, arguments): + # Prevents crash if window is too small to fit text + stdscr.scrollok(True) # Move stdscr to last position return Solve(*arguments, stdscr) print(curses.wrapper(WrappedSolve, arguments))