diff options
author | hobbs <hobbs@noemail.net> | 2006-10-06 04:55:06 (GMT) |
---|---|---|
committer | hobbs <hobbs@noemail.net> | 2006-10-06 04:55:06 (GMT) |
commit | e399f04801ce1468e5d0f26e7425bcf8f4b5df5f (patch) | |
tree | d823557c11ebaf0b84596a83093106b7e5aa7cb7 /generic/tclEncoding.c | |
parent | c1f5046a47c48b0577fed7ff03468db6bbc0d241 (diff) | |
download | tcl-e399f04801ce1468e5d0f26e7425bcf8f4b5df5f.zip tcl-e399f04801ce1468e5d0f26e7425bcf8f4b5df5f.tar.gz tcl-e399f04801ce1468e5d0f26e7425bcf8f4b5df5f.tar.bz2 |
(UnicodeToUtfProc): dst must be set to (ch & 0xFF) to work on big endian systems
FossilOrigin-Name: 1114fb679189b0de3cc5a0850f99c22f80ba982d
Diffstat (limited to 'generic/tclEncoding.c')
-rw-r--r-- | generic/tclEncoding.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c index 70c9eb6..50244b3 100644 --- a/generic/tclEncoding.c +++ b/generic/tclEncoding.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclEncoding.c,v 1.16.2.12 2006/10/05 21:24:56 hobbs Exp $ + * RCS: @(#) $Id: tclEncoding.c,v 1.16.2.13 2006/10/06 04:55:07 hobbs Exp $ */ #include "tclInt.h" @@ -2176,7 +2176,7 @@ UnicodeToUtfProc(clientData, src, srcLen, flags, statePtr, dst, dstLen, */ ch = *(Tcl_UniChar *)src; if (ch && ch < 0x80) { - *dst++ = *src; + *dst++ = (ch & 0xFF); } else { dst += Tcl_UniCharToUtf(ch, dst); } |