summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorhobbs <hobbs>2006-10-06 04:55:32 (GMT)
committerhobbs <hobbs>2006-10-06 04:55:32 (GMT)
commit97b84d183aac17ef445cd59c956d0bb88328dbfe (patch)
tree475ff02ff6fcbb30d7a1275e5fe8c5432069ef60 /generic
parent3bfd23341438ea4cbf59eef614e354bb66b22a84 (diff)
downloadtcl-97b84d183aac17ef445cd59c956d0bb88328dbfe.zip
tcl-97b84d183aac17ef445cd59c956d0bb88328dbfe.tar.gz
tcl-97b84d183aac17ef445cd59c956d0bb88328dbfe.tar.bz2
(UnicodeToUtfProc): dst must be set to (ch & 0xFF) to work on big endian systems
Diffstat (limited to 'generic')
-rw-r--r--generic/tclEncoding.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c
index 65d6f9d..0c0747a 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.45 2006/10/05 21:24:40 hobbs Exp $
+ * RCS: @(#) $Id: tclEncoding.c,v 1.46 2006/10/06 04:55:32 hobbs Exp $
*/
#include "tclInt.h"
@@ -2317,7 +2317,7 @@ UnicodeToUtfProc(
*/
ch = *(Tcl_UniChar *)src;
if (ch && ch < 0x80) {
- *dst++ = *src;
+ *dst++ = (ch & 0xFF);
} else {
dst += Tcl_UniCharToUtf(ch, dst);
}