summaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
authormlelstv <mlelstv@NetBSD.org>2019-07-08 06:45:01 +0000
committermlelstv <mlelstv@NetBSD.org>2019-07-08 06:45:01 +0000
commit0192bd2d7cd0cc87980e3caa5f503cbfd44551c0 (patch)
treecb886683581295d46be0f3f6a0c67b70b49e28a6 /lib/libc
parentbfad25caef61b171ceb5129945ae410d4fa93652 (diff)
The correct fix for lib/51000 is not to remove the apparently dead assignment
but to add the missing usage. From https://bitbucket.org/tnozaki/netbsd/commits/24b35fdce250 Thanks to Takehiko Nozaki
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/citrus/modules/citrus_johab.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/libc/citrus/modules/citrus_johab.c b/lib/libc/citrus/modules/citrus_johab.c
index 981aae9b8ec..9909a9682b4 100644
--- a/lib/libc/citrus/modules/citrus_johab.c
+++ b/lib/libc/citrus/modules/citrus_johab.c
@@ -1,4 +1,4 @@
-/* $NetBSD: citrus_johab.c,v 1.6 2016/05/31 03:34:14 dholland Exp $ */
+/* $NetBSD: citrus_johab.c,v 1.7 2019/07/08 06:45:01 mlelstv Exp $ */
/*-
* Copyright (c)2006 Citrus Project,
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: citrus_johab.c,v 1.6 2016/05/31 03:34:14 dholland Exp $");
+__RCSID("$NetBSD: citrus_johab.c,v 1.7 2019/07/08 06:45:01 mlelstv Exp $");
#endif /* LIBC_SCCS and not lint */
#include <sys/types.h>
@@ -349,9 +349,10 @@ _citrus_JOHAB_stdenc_cstowc(_JOHABEncodingInfo * __restrict ei,
l = ((idx >> 8) & 0xFF) - n;
t = (idx & 0xFF) - 0x21;
linear = (l * 94) + t;
- /*l = (linear / 188) + m;*/
+ l = (linear / 188) + m;
t = linear % 188;
t += (t <= 0x4D) ? 0x31 : 0x43;
+ *wc = (wchar_t)((l << 8) | t);
break;
default:
return EILSEQ;