summaryrefslogtreecommitdiff
path: root/sys-apps/texinfo/files/7.1/0002-tp-Texinfo-XS-xspara.c-xspara__add_next-Do-not-pass.patch
blob: 242f90add70d5ef8454405c907f9c7ada4bcfcdd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
From f038d3f13f95b5494d5523f2af9dec59ff89b79d Mon Sep 17 00:00:00 2001
From: Eli Zaretskii <eliz@gnu.org>
Date: Wed, 25 Oct 2023 22:35:37 +0100
Subject: [PATCH 2/5] * tp/Texinfo/XS/xspara.c (xspara__add_next): Do not pass
 pointer to wint_t as a pointer to wchar_t, as the two types may be of
 different sizes.

---
 ChangeLog              | 6 ++++++
 tp/Texinfo/XS/xspara.c | 4 +++-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index c4379ec56b..3d13a15517 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2023-10-25  Eli Zaretskii <eliz@gnu.org>
+
+	* tp/Texinfo/XS/xspara.c (xspara__add_next): Do not pass
+	pointer to wint_t as a pointer to wchar_t, as the two types
+	may be of different sizes.
+
 2023-10-23  Gavin Smith <gavinsmith0123@gmail.com>
 
 	* tp/Texinfo/XS/xspara.c (get_utf8_codepoint):
diff --git a/tp/Texinfo/XS/xspara.c b/tp/Texinfo/XS/xspara.c
index e1cddcdc2a..130e43a4db 100644
--- a/tp/Texinfo/XS/xspara.c
+++ b/tp/Texinfo/XS/xspara.c
@@ -754,7 +754,9 @@ xspara__add_next (TEXT *result, char *word, int word_len, int transparent)
               if (!strchr (end_sentence_characters
                            after_punctuation_characters, *p))
                 {
-                  get_utf8_codepoint (&state.last_letter, p, len);
+                  wchar_t wc;
+                  get_utf8_codepoint (&wc, p, len);
+                  state.last_letter = wc;
                 }
             }
         }
-- 
2.42.1