From 64e9557c5f6ae4416a1a12fd6f68f0d19931bb99 Mon Sep 17 00:00:00 2001 From: altermo <107814000+altermo@users.noreply.github.com> Date: Thu, 24 Oct 2024 13:39:06 +0200 Subject: [PATCH] fix: charset.max_char may be used before being set --- src/charset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/charset.c b/src/charset.c index e8d0826..14b33d2 100644 --- a/src/charset.c +++ b/src/charset.c @@ -1007,7 +1007,7 @@ DEFUN ("define-charset-internal", Fdefine_charset_internal, i = CODE_POINT_TO_INDEX (&charset, charset.max_code); if (MAX_CHAR - charset.code_offset < i) - error ("Unsupported max char: %d", charset.max_char); + error ("Unsupported max char: %d", i + charset.code_offset); charset.max_char = i + charset.code_offset; i = CODE_POINT_TO_INDEX (&charset, charset.min_code); charset.min_char = i + charset.code_offset; -- 2.47.0