]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix crashes on TTY frames due to negative lnum_width.
authorEli Zaretskii <eliz@gnu.org>
Sat, 24 Jun 2017 10:26:01 +0000 (13:26 +0300)
committerEli Zaretskii <eliz@gnu.org>
Sat, 24 Jun 2017 10:26:01 +0000 (13:26 +0300)
src/xdisp.c

index 19e3efb2f3d7848b6404bb28bbe9fed6f6e14276..f98e7a9ac7eab3a7e6abcf264835e0b39baa1990 100644 (file)
@@ -20770,6 +20770,7 @@ maybe_produce_line_number (struct it *it)
          else
            max_lnum =
              this_line + it->w->desired_matrix->nrows - 1 - it->vpos;
+         max_lnum = max (1, max_lnum);
          it->lnum_width = log10 (max_lnum) + 1;
        }
       eassert (it->lnum_width > 0);