aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGerd Moellmann2000-09-27 11:46:33 +0000
committerGerd Moellmann2000-09-27 11:46:33 +0000
commit3ed365143a680d791ee74ec4de255dc42a194d73 (patch)
treeac8d44b102f433fdc3d7857515f3b2a161554a3d /src
parent7ecd493745ca9df70249e04f303cfb5451679f10 (diff)
downloademacs-3ed365143a680d791ee74ec4de255dc42a194d73.tar.gz
emacs-3ed365143a680d791ee74ec4de255dc42a194d73.zip
(adjust_glyph_matrix, enable_glyph_matrix_rows):
Add assertions.
Diffstat (limited to 'src')
-rw-r--r--src/dispnew.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/dispnew.c b/src/dispnew.c
index fd467f4a6d3..b20383dcfa9 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -667,6 +667,7 @@ adjust_glyph_matrix (w, matrix, x, y, dim)
667 667
668 /* Number of rows to be used by MATRIX. */ 668 /* Number of rows to be used by MATRIX. */
669 matrix->nrows = dim.height; 669 matrix->nrows = dim.height;
670 xassert (matrix->nrows >= 0);
670 671
671 /* Mark rows in a current matrix of a window as not having valid 672 /* Mark rows in a current matrix of a window as not having valid
672 contents. It's important to not do this for desired matrices. 673 contents. It's important to not do this for desired matrices.
@@ -809,6 +810,10 @@ enable_glyph_matrix_rows (matrix, start, end, enabled_p)
809 int start, end; 810 int start, end;
810 int enabled_p; 811 int enabled_p;
811{ 812{
813 xassert (start <= end);
814 xassert (start >= 0 && start < matrix->nrows);
815 xassert (end >= 0 && end <= matrix->nrows);
816
812 for (; start < end; ++start) 817 for (; start < end; ++start)
813 matrix->rows[start].enabled_p = enabled_p != 0; 818 matrix->rows[start].enabled_p = enabled_p != 0;
814} 819}