diff options
author | Kevin McCarthy <kevin@8t8.us> | 2021-01-27 13:38:53 -0800 |
---|---|---|
committer | Kevin McCarthy <kevin@8t8.us> | 2021-01-27 13:54:50 -0800 |
commit | 3e35377ebea72b9958be8c20d0347aa4b16b0438 (patch) | |
tree | dfd8628ecb52bbaa82445c144b763e738f9124c6 /resize.c | |
parent | d1729b7cc099a2dd9b2ac8fe423e3f423ee39508 (diff) |
Fix small error in mutt_resize_term().
Commit 547b25a2 accidentally removed the default value setting if
LINES or COLUMNS are null. Also, set default values if the atoi
fails.
Diffstat (limited to 'resize.c')
-rw-r--r-- | resize.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -59,12 +59,16 @@ void mutt_resize_screen (void) } if (SLtt_Screen_Rows <= 0) { - if ((cp = getenv ("LINES")) != NULL && mutt_atoi (cp, &SLtt_Screen_Rows, 0) < 0) + if ((cp = getenv ("LINES")) != NULL) + mutt_atoi (cp, &SLtt_Screen_Rows, 0); + if (SLtt_Screen_Rows <= 0) SLtt_Screen_Rows = 24; } if (SLtt_Screen_Cols <= 0) { - if ((cp = getenv ("COLUMNS")) != NULL && mutt_atoi (cp, &SLtt_Screen_Cols, 0) < 0) + if ((cp = getenv ("COLUMNS")) != NULL) + mutt_atoi (cp, &SLtt_Screen_Cols, 0); + if (SLtt_Screen_Cols <= 0) SLtt_Screen_Cols = 80; } #ifdef USE_SLANG_CURSES |