issue #1083: limit history size to fix crash (#1436)

The calulated limit ensures that at least one message will be displayed.
Using a hard-coded constant is ugly, but such are scattered throughout
the script.  Untangling those constants has been left for future patch.
pull/1439/head
Zach Welch 2018-02-22 23:54:20 -08:00 committed by Steve Penrod
parent efc1c1d71e
commit 49b1a0ca5c
1 changed files with 3 additions and 0 deletions

View File

@ -840,6 +840,9 @@ def handle_cmd(cmd):
lines = int(_get_cmd_param(cmd))
if lines < 1:
lines = 1
max_chat_area = curses.LINES - 7
if lines > max_chat_area:
lines = max_chat_area
cy_chat_area = lines
elif "skills" in cmd:
# List loaded skill