From 4d4b690a9999a1683362e92bf315842cacf911b6 Mon Sep 17 00:00:00 2001 From: Luflosi Date: Mon, 25 Feb 2019 16:13:56 +0100 Subject: [PATCH] Change cell_height and cell_width checks to be consistent with later check --- kitty/fonts.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kitty/fonts.c b/kitty/fonts.c index e2ef5f171..9647b5ad4 100644 --- a/kitty/fonts.c +++ b/kitty/fonts.c @@ -398,9 +398,9 @@ calc_cell_metrics(FontGroup *fg) { if (OPT(adjust_line_height_frac) != 0.f) ch *= OPT(adjust_line_height_frac); if (OPT(adjust_column_width_px != 0)) cw += OPT(adjust_column_width_px); if (OPT(adjust_column_width_frac) != 0.f) cw *= OPT(adjust_column_width_frac); - if (cw >= 2 && cw < 1000) cell_width = cw; + if (cw >= 2 && cw <= 1000) cell_width = cw; else log_error("Cell width invalid after adjustment, ignoring adjust_column_width"); - if (ch >= 4 && ch < 1000) cell_height = ch; + if (ch >= 4 && ch <= 1000) cell_height = ch; else log_error("Cell height invalid after adjustment, ignoring adjust_line_height"); int line_height_adjustment = cell_height - before_cell_height; if (cell_height < 4) fatal("Line height too small after adjustment");