summaryrefslogtreecommitdiffstats
path: root/generic/tclStringObj.c
diff options
context:
space:
mode:
authorapnadkarni <apnmbx-wits@yahoo.com>2023-04-19 13:21:56 (GMT)
committerapnadkarni <apnmbx-wits@yahoo.com>2023-04-19 13:21:56 (GMT)
commit11b8f6eb00bb80ed84c0b8f4c382b9626f94e7ea (patch)
treefb7f2d96d4fe7aaed651b4d6145ad93a333803ea /generic/tclStringObj.c
parentf6830a72ec9060084f21dea70771bc1092d5f207 (diff)
downloadtcl-11b8f6eb00bb80ed84c0b8f4c382b9626f94e7ea.zip
tcl-11b8f6eb00bb80ed84c0b8f4c382b9626f94e7ea.tar.gz
tcl-11b8f6eb00bb80ed84c0b8f4c382b9626f94e7ea.tar.bz2
Fix [3c04fcdd1a] - join truncates large lists
Diffstat (limited to 'generic/tclStringObj.c')
-rw-r--r--generic/tclStringObj.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c
index 3063ea3..2bbc4bc 100644
--- a/generic/tclStringObj.c
+++ b/generic/tclStringObj.c
@@ -3115,23 +3115,24 @@ TclStringRepeat(
Tcl_Obj *
TclStringCat(
Tcl_Interp *interp,
- int objc,
+ Tcl_Size objc,
Tcl_Obj * const objv[],
int flags)
{
Tcl_Obj *objResultPtr, * const *ov;
- int oc, binary = 1;
+ int binary = 1;
+ Tcl_Size oc;
Tcl_Size length = 0;
int allowUniChar = 1, requestUniChar = 0, forceUniChar = 0;
- int first = objc - 1; /* Index of first value possibly not empty */
- int last = 0; /* Index of last value possibly not empty */
+ Tcl_Size first = objc - 1; /* Index of first value possibly not empty */
+ Tcl_Size last = 0; /* Index of last value possibly not empty */
int inPlace = flags & TCL_STRING_IN_PLACE;
/* assert ( objc >= 0 ) */
if (objc <= 1) {
- /* Only one or no objects; return first or empty */
- return objc ? objv[0] : Tcl_NewObj();
+ /* Negative (shouldn't be), one or no objects; return first or empty */
+ return objc == 1 ? objv[0] : Tcl_NewObj();
}
/* assert ( objc >= 2 ) */