citrus_johab.c: convert another encoding to JOHAB doesn't work anymore

Issue #81 closed
Takehiko NOZAKI repo owner created an issue

apparently my bone head, _citrus_JOHAB_stdenc_cstowc() never set the wchar_t value...

diff --git a/lib/libc/citrus/modules/citrus_johab.c b/lib/libc/citrus/modules/citrus_johab.c
index 1cd6c42..b580bd2 100644
--- a/lib/libc/citrus/modules/citrus_johab.c
+++ b/lib/libc/citrus/modules/citrus_johab.c
@@ -327,6 +327,7 @@ _citrus_JOHAB_stdenc_cstowc(_JOHABEncodingInfo * __restrict ei,
                l = (linear / 188) + m;
                t = linear % 188;
                t += (t <= 0x4D) ? 0x31 : 0x43;
+               *wc = (wchar_t)((l << 8) | t);
                break;
        default:
                return EILSEQ;

Comments (5)

  1. Log in to comment