summaryrefslogtreecommitdiffstats
path: root/resize.c
diff options
context:
space:
mode:
authorKevin McCarthy <kevin@8t8.us>2021-01-27 13:38:53 -0800
committerKevin McCarthy <kevin@8t8.us>2021-01-27 13:54:50 -0800
commit3e35377ebea72b9958be8c20d0347aa4b16b0438 (patch)
treedfd8628ecb52bbaa82445c144b763e738f9124c6 /resize.c
parentd1729b7cc099a2dd9b2ac8fe423e3f423ee39508 (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.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/resize.c b/resize.c
index 120f967d..fa24d329 100644
--- a/resize.c
+++ b/resize.c
@@ -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