From 3ed365143a680d791ee74ec4de255dc42a194d73 Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Wed, 27 Sep 2000 11:46:33 +0000 Subject: [PATCH] (adjust_glyph_matrix, enable_glyph_matrix_rows): Add assertions. --- lisp/ChangeLog | 1 - src/dispnew.c | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 18045f7bb60..96b7be2532e 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -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 * progmodes/hideshow.el: Update author email address. 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) /* 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; } -- 2.39.2