summaryrefslogtreecommitdiffstats
path: root/generic/tclEncoding.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2022-02-24 22:31:13 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2022-02-24 22:31:13 (GMT)
commitf2e56cab06bb6e9e9aeea7e59db993350c99a997 (patch)
tree646a1ad25d1ee8f38e36ede30d881c915f1dfc31 /generic/tclEncoding.c
parent66ffdbf0ec22d179161e49cec7b256b06f246b27 (diff)
parentb788457ad48d5cc34b431418f7d076d83f78b5ff (diff)
downloadtcl-f2e56cab06bb6e9e9aeea7e59db993350c99a997.zip
tcl-f2e56cab06bb6e9e9aeea7e59db993350c99a997.tar.gz
tcl-f2e56cab06bb6e9e9aeea7e59db993350c99a997.tar.bz2
Merge 8.7
Diffstat (limited to 'generic/tclEncoding.c')
-rw-r--r--generic/tclEncoding.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c
index 1b33ca4..3a6385f 100644
--- a/generic/tclEncoding.c
+++ b/generic/tclEncoding.c
@@ -2736,7 +2736,7 @@ UtfToUcs2Proc(
{
const char *srcStart, *srcEnd, *srcClose, *dstStart, *dstEnd;
int result, numChars;
-#if TCL_UTF_MAX <= 3
+#if TCL_UTF_MAX < 4
int len;
#endif
Tcl_UniChar ch = 0;
@@ -2767,7 +2767,7 @@ UtfToUcs2Proc(
result = TCL_CONVERT_NOSPACE;
break;
}
-#if TCL_UTF_MAX <= 3
+#if TCL_UTF_MAX < 4
src += (len = TclUtfToUniChar(src, &ch));
if ((ch >= 0xD800) && (len < 3)) {
src += TclUtfToUniChar(src, &ch);
@@ -3180,7 +3180,7 @@ Iso88591FromUtfProc(
*/
if (ch > 0xFF
-#if TCL_UTF_MAX <= 3
+#if TCL_UTF_MAX < 4
|| ((ch >= 0xD800) && (len < 3))
#endif
) {
@@ -3188,7 +3188,7 @@ Iso88591FromUtfProc(
result = TCL_CONVERT_UNKNOWN;
break;
}
-#if TCL_UTF_MAX <= 3
+#if TCL_UTF_MAX < 4
if ((ch >= 0xD800) && (len < 3)) {
len = 4;
}