summaryrefslogtreecommitdiffstats
path: root/generic/tclUtf.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclUtf.c')
-rw-r--r--generic/tclUtf.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/generic/tclUtf.c b/generic/tclUtf.c
index d3d33c2..4b70f96 100644
--- a/generic/tclUtf.c
+++ b/generic/tclUtf.c
@@ -383,14 +383,14 @@ Tcl_UtfToUniChar(
#else
*chPtr = (((byte & 0x07) << 18) | ((src[1] & 0x3F) << 12)
| ((src[2] & 0x3F) << 6) | (src[3] & 0x3F));
- if ((*chPtr - 0x10000) <= 0xFFFFF) {
+ if ((unsigned)(*chPtr - 0x10000) <= 0xFFFFF) {
return 4;
}
#endif
}
/*
- * A four-byte-character lead-byte not followed by two trail-bytes
+ * A four-byte-character lead-byte not followed by three trail-bytes
* represents itself.
*/
}
@@ -898,7 +898,7 @@ Tcl_UtfToUpper(
*/
if (len < UtfCount(upChar)) {
- memcpy(dst, src, len);
+ memmove(dst, src, len);
dst += len;
} else {
dst += Tcl_UniCharToUtf(upChar, dst);
@@ -951,7 +951,7 @@ Tcl_UtfToLower(
*/
if (len < UtfCount(lowChar)) {
- memcpy(dst, src, len);
+ memmove(dst, src, len);
dst += len;
} else {
dst += Tcl_UniCharToUtf(lowChar, dst);
@@ -1001,7 +1001,7 @@ Tcl_UtfToTitle(
titleChar = Tcl_UniCharToTitle(ch);
if (len < UtfCount(titleChar)) {
- memcpy(dst, src, len);
+ memmove(dst, src, len);
dst += len;
} else {
dst += Tcl_UniCharToUtf(titleChar, dst);
@@ -1017,7 +1017,7 @@ Tcl_UtfToTitle(
}
if (len < UtfCount(lowChar)) {
- memcpy(dst, src, len);
+ memmove(dst, src, len);
dst += len;
} else {
dst += Tcl_UniCharToUtf(lowChar, dst);