summaryrefslogtreecommitdiff
path: root/source3/lib/util_unistr.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>1999-12-13 19:17:40 +0000
committerJeremy Allison <jra@samba.org>1999-12-13 19:17:40 +0000
commit92a036cc37bb6e058cb86de1cc4d575d20032ce7 (patch)
treefff982d822bf9eb4ca7d61c62a08cd6c08ed869e /source3/lib/util_unistr.c
parent32a965e09ce4befe971855e11e1fb5ceb51a9ed1 (diff)
downloadsamba-92a036cc37bb6e058cb86de1cc4d575d20032ce7.tar.gz
samba-92a036cc37bb6e058cb86de1cc4d575d20032ce7.tar.bz2
samba-92a036cc37bb6e058cb86de1cc4d575d20032ce7.zip
Unicode conversion fix in Japanese environment from Motonobu TAKAHASHI.
Jeremy. (This used to be commit decc6ebca29abd78754c275352de58b0de2e2aa5)
Diffstat (limited to 'source3/lib/util_unistr.c')
-rw-r--r--source3/lib/util_unistr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/lib/util_unistr.c b/source3/lib/util_unistr.c
index aee2a21fc0..185e7c3547 100644
--- a/source3/lib/util_unistr.c
+++ b/source3/lib/util_unistr.c
@@ -61,7 +61,7 @@ int dos_PutUniCode(char *dst,const char *src, ssize_t len)
*/
if (skip == 2)
- val = ((val << 8) | src[1]);
+ val = ((val << 8) | (src[1] & 0xff));
SSVAL(dst,ret,doscp_to_ucs2[val]);
ret += 2;
@@ -279,7 +279,7 @@ size_t dos_struni2(char *dst, const char *src, size_t max_len)
*/
if (skip == 2)
- val = ((val << 8) | src[1]);
+ val = ((val << 8) | (src[1] & 0xff));
SSVAL(dst,0,doscp_to_ucs2[val]);
if (skip)