summaryrefslogtreecommitdiffstats
path: root/generic/tclStringObj.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-02-13 22:06:10 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-02-13 22:06:10 (GMT)
commit8c3eb78cf7bd96819cbf50c6552954c785098f69 (patch)
treeef70c73ff15c99c137682381b9c15c4871fe505c /generic/tclStringObj.c
parent14b5289e4aa4945dd080d1d3d2dad7f54537eec8 (diff)
parent73cc9cd62f844146e1d9a835511da3b641aafac0 (diff)
downloadtcl-8c3eb78cf7bd96819cbf50c6552954c785098f69.zip
tcl-8c3eb78cf7bd96819cbf50c6552954c785098f69.tar.gz
tcl-8c3eb78cf7bd96819cbf50c6552954c785098f69.tar.bz2
Merge 8.7
Diffstat (limited to 'generic/tclStringObj.c')
-rw-r--r--generic/tclStringObj.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c
index 71cdce4..6ab2371 100644
--- a/generic/tclStringObj.c
+++ b/generic/tclStringObj.c
@@ -571,7 +571,7 @@ Tcl_GetUniChar(
return -1;
}
ch = stringPtr->unicode[index];
-#if TCL_UTF_MAX <= 4
+#if TCL_UTF_MAX <= 3
/* See: bug [11ae2be95dac9417] */
if ((ch & 0xF800) == 0xD800) {
if (ch & 0x400) {
@@ -755,7 +755,7 @@ Tcl_GetRange(
if (last < first) {
return Tcl_NewObj();
}
-#if TCL_UTF_MAX <= 4
+#if TCL_UTF_MAX <= 3
/* See: bug [11ae2be95dac9417] */
if ((first > 0) && ((stringPtr->unicode[first] & 0xFC00) == 0xDC00)
&& ((stringPtr->unicode[first-1] & 0xFC00) == 0xD800)) {
@@ -2273,7 +2273,7 @@ Tcl_AppendFormatToObj(
uw /= base;
}
#endif
- } else if (useBig && big.used) {
+ } else if (useBig && !mp_iszero(&big)) {
int leftover = (big.used * MP_DIGIT_BIT) % numBits;
mp_digit mask = (~(mp_digit)0) << (MP_DIGIT_BIT-leftover);
@@ -2312,7 +2312,7 @@ Tcl_AppendFormatToObj(
while (numDigits--) {
int digitOffset;
- if (useBig && big.used) {
+ if (useBig && !mp_iszero(&big)) {
if (index < big.used && (size_t) shift <
CHAR_BIT*sizeof(Tcl_WideUInt) - MP_DIGIT_BIT) {
bits |= ((Tcl_WideUInt) big.dp[index++]) << shift;
@@ -2616,7 +2616,7 @@ AppendPrintfToObjVA(
end = q;
}
- q = bytes + TCL_UTF_MAX;
+ q = bytes + 4;
while ((bytes < end) && (bytes < q)
&& ((*bytes & 0xC0) == 0x80)) {
bytes++;