diff options
author | jenglish <jenglish@flightlab.com> | 2008-06-11 01:30:10 (GMT) |
---|---|---|
committer | jenglish <jenglish@flightlab.com> | 2008-06-11 01:30:10 (GMT) |
commit | 22ce20b0712b45f83d2781416637d4f220de4478 (patch) | |
tree | 774c3b96d3079d675f1fcb33de6ad53c987d9fee | |
parent | 27cef4c3985bd16df029f37ca9023ed02409ac9b (diff) | |
download | tcl-22ce20b0712b45f83d2781416637d4f220de4478.zip tcl-22ce20b0712b45f83d2781416637d4f220de4478.tar.gz tcl-22ce20b0712b45f83d2781416637d4f220de4478.tar.bz2 |
UtfToUtfProc: Avoid unwanted sign extension when converting
incomplete UTF-8 sequences. See [Bug 1908443] for details.
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | generic/tclEncoding.c | 4 |
2 files changed, 8 insertions, 2 deletions
@@ -1,3 +1,9 @@ +2008-06-10 Joe English <jenglish@users.sourceforge.net> + + * generic/tclEncoding.c(UtfToUtfProc): Avoid unwanted sign extension + when converting incomplete UTF-8 sequences. See [Bug 1908443] + for details. + 2008-06-10 Andreas Kupries <andreask@activestate.com> * tests/ioTrans.test (iortrans.tf-6.1): Fixed the [Bug 1988552], diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c index ff73502..456c8a4 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.60 2008/04/27 22:21:29 dkf Exp $ + * RCS: @(#) $Id: tclEncoding.c,v 1.61 2008/06/11 01:30:11 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 { |