diff options
| author | jenglish@flightlab.com <jenglish> | 2008-06-11 01:30:10 (GMT) |
|---|---|---|
| committer | jenglish@flightlab.com <jenglish> | 2008-06-11 01:30:10 (GMT) |
| commit | 6e3e4fcf222e5e993539b969693ea4cfd59b638a (patch) | |
| tree | 774c3b96d3079d675f1fcb33de6ad53c987d9fee /generic/tclEncoding.c | |
| parent | 793042222f94c0997e55a71fc34e2026b23e2f2d (diff) | |
| download | tcl-6e3e4fcf222e5e993539b969693ea4cfd59b638a.zip tcl-6e3e4fcf222e5e993539b969693ea4cfd59b638a.tar.gz tcl-6e3e4fcf222e5e993539b969693ea4cfd59b638a.tar.bz2 | |
UtfToUtfProc: Avoid unwanted sign extension when converting
incomplete UTF-8 sequences. See [Bug 1908443] for details.
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 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 { |
