diff options
author | Stefan Metzmacher <metze@samba.org> | 2011-11-15 15:57:10 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2011-11-16 00:26:41 +0100 |
commit | 1312e9027945898a7352e22cfaf127e7ffc8327a (patch) | |
tree | 1e7c0216343e9065f3dd22b49fa0673b92043288 /source4 | |
parent | 3ede4ffe969f806ba2363b62c09673c32a4ec296 (diff) | |
download | samba-1312e9027945898a7352e22cfaf127e7ffc8327a.tar.gz samba-1312e9027945898a7352e22cfaf127e7ffc8327a.tar.bz2 samba-1312e9027945898a7352e22cfaf127e7ffc8327a.zip |
HEIMDAL:lib/wind: fix wind_ucs4utf8() and wind_ucs2utf8()
Pair-Programmed-With: Arvid Requate <requate@univention.de>
metze
Diffstat (limited to 'source4')
-rw-r--r-- | source4/heimdal/lib/wind/utf8.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source4/heimdal/lib/wind/utf8.c b/source4/heimdal/lib/wind/utf8.c index 6907b3c9d3..fce6defd82 100644 --- a/source4/heimdal/lib/wind/utf8.c +++ b/source4/heimdal/lib/wind/utf8.c @@ -204,13 +204,13 @@ wind_ucs4utf8(const uint32_t *in, size_t in_len, char *out, size_t *out_len) switch(len) { case 4: out[3] = (ch | 0x80) & 0xbf; - ch = ch << 6; + ch = ch >> 6; case 3: out[2] = (ch | 0x80) & 0xbf; - ch = ch << 6; + ch = ch >> 6; case 2: out[1] = (ch | 0x80) & 0xbf; - ch = ch << 6; + ch = ch >> 6; case 1: out[0] = ch | first_char[len - 1]; } @@ -479,10 +479,10 @@ wind_ucs2utf8(const uint16_t *in, size_t in_len, char *out, size_t *out_len) switch(len) { case 3: out[2] = (ch | 0x80) & 0xbf; - ch = ch << 6; + ch = ch >> 6; case 2: out[1] = (ch | 0x80) & 0xbf; - ch = ch << 6; + ch = ch >> 6; case 1: out[0] = ch | first_char[len - 1]; } |