diff options
| author | Eli Zaretskii | 2017-06-24 13:26:01 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2017-06-24 13:26:01 +0300 |
| commit | 7d7602cea09692eddb6a8d16f7786b5086a01091 (patch) | |
| tree | 3cd46f651bc6a08b020d2b49157227f6a5e16590 /src | |
| parent | 9776d7bcf044722909c10c9395d18c81641f27d0 (diff) | |
| download | emacs-7d7602cea09692eddb6a8d16f7786b5086a01091.tar.gz emacs-7d7602cea09692eddb6a8d16f7786b5086a01091.zip | |
Fix crashes on TTY frames due to negative lnum_width.
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index 19e3efb2f3d..f98e7a9ac7e 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -20770,6 +20770,7 @@ maybe_produce_line_number (struct it *it) | |||
| 20770 | else | 20770 | else |
| 20771 | max_lnum = | 20771 | max_lnum = |
| 20772 | this_line + it->w->desired_matrix->nrows - 1 - it->vpos; | 20772 | this_line + it->w->desired_matrix->nrows - 1 - it->vpos; |
| 20773 | max_lnum = max (1, max_lnum); | ||
| 20773 | it->lnum_width = log10 (max_lnum) + 1; | 20774 | it->lnum_width = log10 (max_lnum) + 1; |
| 20774 | } | 20775 | } |
| 20775 | eassert (it->lnum_width > 0); | 20776 | eassert (it->lnum_width > 0); |