emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] emacs-25 8be32cf: Fix an assertion


From: Chris Feng
Subject: [Emacs-diffs] emacs-25 8be32cf: Fix an assertion
Date: Thu, 25 Feb 2016 01:37:34 +0000

branch: emacs-25
commit 8be32cf45cd8b39ff6c8dc431b0ac04a0959786d
Author: Chris Feng <address@hidden>
Commit: Chris Feng <address@hidden>

    Fix an assertion
    
    * src/dispnew.c (clear_glyph_matrix_rows): Test matrix->nrows == 0 (which
    implies start == 0) separately.
---
 src/dispnew.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/dispnew.c b/src/dispnew.c
index f96db30..f834f35 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -683,7 +683,9 @@ void
 clear_glyph_matrix_rows (struct glyph_matrix *matrix, int start, int end)
 {
   eassert (start <= end);
-  eassert (start >= 0 && start <= matrix->nrows);
+  eassert (start >= 0 && (start < matrix->nrows
+                         /* matrix->nrows can be 0 for the initial frame.  */
+                         || (matrix->nrows == 0)));
   eassert (end >= 0 && end <= matrix->nrows);
 
   for (; start < end; ++start)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]