]> git.eshelyaron.com Git - emacs.git/commitdiff
(adjust_glyph_matrix, enable_glyph_matrix_rows):
authorGerd Moellmann <gerd@gnu.org>
Wed, 27 Sep 2000 11:46:33 +0000 (11:46 +0000)
committerGerd Moellmann <gerd@gnu.org>
Wed, 27 Sep 2000 11:46:33 +0000 (11:46 +0000)
Add assertions.

lisp/ChangeLog
src/dispnew.c

index 18045f7bb60c6ddadd638eaf038b8f3fc7c4a872..96b7be2532eaf89c207f81075b4fcdf807c006a5 100644 (file)
@@ -69,7 +69,6 @@
        * startup.el (command-line-1, fancy-splash-text): Change the
        text to sound more friendly.
 
->>>>>>> 1.1138
 2000-09-23  Thien-Thi Nguyen  <ttn@gnu.org>
 
        * progmodes/hideshow.el: Update author email address.
index fd467f4a6d39655ada6e095ddac910c8bc5a8880..b20383dcfa91920c74ccb9937a4cade2f251092f 100644 (file)
@@ -667,6 +667,7 @@ adjust_glyph_matrix (w, matrix, x, y, dim)
   
   /* Number of rows to be used by MATRIX.  */
   matrix->nrows = dim.height;
+  xassert (matrix->nrows >= 0);
 
   /* Mark rows in a current matrix of a window as not having valid
      contents.  It's important to not do this for desired matrices.
@@ -809,6 +810,10 @@ enable_glyph_matrix_rows (matrix, start, end, enabled_p)
      int start, end;
      int enabled_p;
 {
+  xassert (start <= end);
+  xassert (start >= 0 && start < matrix->nrows);
+  xassert (end >= 0 && end <= matrix->nrows);
+  
   for (; start < end; ++start)
     matrix->rows[start].enabled_p = enabled_p != 0;
 }