summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorjenglish <jenglish@flightlab.com>2008-07-04 19:22:20 (GMT)
committerjenglish <jenglish@flightlab.com>2008-07-04 19:22:20 (GMT)
commit53ca8c3c36eb3e91b418b65e588a601b017aa9dc (patch)
tree0e1a7b062ba2091983e21b4b8521c7354cbf5bdb /generic
parent0eeeeffffb57a74d4c7c20806ffa179517190e41 (diff)
downloadtcl-53ca8c3c36eb3e91b418b65e588a601b017aa9dc.zip
tcl-53ca8c3c36eb3e91b418b65e588a601b017aa9dc.tar.gz
tcl-53ca8c3c36eb3e91b418b65e588a601b017aa9dc.tar.bz2
UtfToUtfProc: Avoid unwanted sign extension when converting incomplete UTF-8
sequences. See [Bug 1908443] for details.
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 95f89a4..1d4de73 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.59 2008/03/11 22:25:12 das Exp $
+ * RCS: @(#) $Id: tclEncoding.c,v 1.59.2.1 2008/07/04 19:22:21 jenglish Exp $
*/
#include "tclInt.h"
@@ -2292,7 +2292,7 @@ UtfToUtfProc(
* incomplete char its byts are made to represent themselves.
*/
- ch = (Tcl_UniChar) *src;
+ ch = (unsigned char) *src;
src += 1;
dst += Tcl_UniCharToUtf(ch, dst);
} else {