aboutsummaryrefslogtreecommitdiff
path: root/libX11/src/xlibi18n/lcUTF8.c
diff options
context:
space:
mode:
Diffstat (limited to 'libX11/src/xlibi18n/lcUTF8.c')
-rw-r--r--libX11/src/xlibi18n/lcUTF8.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libX11/src/xlibi18n/lcUTF8.c b/libX11/src/xlibi18n/lcUTF8.c
index 0f3d0d2ca..38201573e 100644
--- a/libX11/src/xlibi18n/lcUTF8.c
+++ b/libX11/src/xlibi18n/lcUTF8.c
@@ -1015,7 +1015,7 @@ ucstocs1(
XPointer *args,
int num_args)
{
- ucs4_t const *src = (ucs4_t const *) *from;
+ ucs4_t const *src;
unsigned char *dst = (unsigned char *) *to;
int unconv_num = 0;
Utf8Conv *preferred_charsets = (Utf8Conv *) conv->state;
@@ -1027,6 +1027,8 @@ ucstocs1(
if (from == NULL || *from == NULL)
return 0;
+ src = (ucs4_t const *) *from;
+
count = charset_wctocs_exactly(preferred_charsets, &chosen_charset,
&chosen_side, conv, dst, *src, *to_left);
if (count < 1) {