summaryrefslogtreecommitdiffstats
path: root/generic/tclStringObj.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2021-12-13 12:59:46 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2021-12-13 12:59:46 (GMT)
commit45a9461fda336f79a4f493d92cf07164c48cbf44 (patch)
treee8bd5e2b87df51e0545e608aa8297b9ad711e265 /generic/tclStringObj.c
parentadcaff51ac47153e4fd3ff2dd206c0c03271ef04 (diff)
parentf17186825609c292c275e963cefff8e953504e63 (diff)
downloadtcl-45a9461fda336f79a4f493d92cf07164c48cbf44.zip
tcl-45a9461fda336f79a4f493d92cf07164c48cbf44.tar.gz
tcl-45a9461fda336f79a4f493d92cf07164c48cbf44.tar.bz2
Merge 8.6
Diffstat (limited to 'generic/tclStringObj.c')
-rw-r--r--generic/tclStringObj.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c
index 91b632a..4735f43 100644
--- a/generic/tclStringObj.c
+++ b/generic/tclStringObj.c
@@ -1689,8 +1689,8 @@ AppendUtfToUtfRep(
* the reallocs below.
*/
- if (bytes && bytes >= objPtr->bytes
- && bytes <= objPtr->bytes + objPtr->length) {
+ if (bytes && objPtr->bytes && (bytes >= objPtr->bytes)
+ && (bytes <= objPtr->bytes + objPtr->length)) {
offset = bytes - objPtr->bytes;
}