From 68c95424afadc486ac61ca60a2b0277ab36ae184 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Fri, 18 Nov 2011 14:41:36 +0200 Subject: [PATCH] Add assertion for hash values of rows. src/dispnew.c (add_row_entry): Add xassert to verify that ROW's hash code is valid. --- src/ChangeLog | 1 + src/dispnew.c | 1 + 2 files changed, 2 insertions(+) diff --git a/src/ChangeLog b/src/ChangeLog index b394c37354f..9af953b08b1 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -4,6 +4,7 @@ hash values of the two rows. (copy_row_except_pointers): Preserve the used[] arrays and the hash values of the two rows. (Bug#10035) + (add_row_entry): Add xassert to verify that ROW's hash code is valid. * xdisp.c (row_hash): New function, body extracted from compute_line_metrics. diff --git a/src/dispnew.c b/src/dispnew.c index 07843d3e214..d6bf6666ee2 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -4240,6 +4240,7 @@ add_row_entry (struct glyph_row *row) ptrdiff_t i = row->hash % row_table_size; entry = row_table[i]; + xassert (entry || verify_row_hash (row)); while (entry && !row_equal_p (entry->row, row, 1)) entry = entry->next; -- 2.39.2