changeset 31932:081edde76197

(adjust_glyph_matrix, enable_glyph_matrix_rows): Add assertions.
author Gerd Moellmann <gerd@gnu.org>
date Wed, 27 Sep 2000 11:43:51 +0000
parents 85c245edb7d7
children ebf9d20c93c0
files src/dispnew.c
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/dispnew.c	Wed Sep 27 11:43:08 2000 +0000
+++ b/src/dispnew.c	Wed Sep 27 11:43:51 2000 +0000
@@ -667,6 +667,7 @@
   
   /* 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 @@
      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;
 }