feature/igc3 5db992782c8 1/4: * src/igc.c (set_header): Fix byte/word confusion in assertion.

Helmut Eller <[email protected]> Tue, 28 Jul 2026 17:02:05 -0400 (EDT)
Newsgroups gmane.emacs.diffs
Message-ID <[email protected]>
branch: feature/igc3
commit 5db992782c8e916dcdb1184fb1846a9fa72f5b65
Author: Helmut Eller <[email protected]>
Commit: Helmut Eller <[email protected]>

    * src/igc.c (set_header): Fix byte/word confusion in assertion.
---
 src/igc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/igc.c b/src/igc.c
index 8adbd8d327a..6b1936e6be6 100644
--- a/src/igc.c
+++ b/src/igc.c
@@ -762,7 +762,8 @@ static void
 set_header (union igc_header *h, enum igc_obj_type type,
 	    mps_word_t nbytes, mps_word_t hash)
 {
-  igc_assert (nbytes < ((uint64_t) 1 << IGC_HEADER_NWORDS_BITS));
+  igc_assert (to_words (nbytes)
+	      < ((uint64_t) 1 << IGC_HEADER_NWORDS_BITS));
   igc_assert (type == IGC_OBJ_PAD
 	      || nbytes >= sizeof (struct igc_fwd));
   union igc_header val = { .s = { .tag = IGC_TAG_OBJ,