From f55203403c6ec05a55134dcfea129095e91c098e Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 12 Jul 2022 12:23:54 +0000 Subject: Fix [b79df322a9] follow-up: Tcl_NewUnicodeObj truncates strings --- generic/tclStringObj.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 86b3937..10a8627 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -984,7 +984,11 @@ TclGetUnicodeFromObj( { String *stringPtr; +#if TCL_UTF_MAX > 3 + SetUTF16StringFromAny(NULL, objPtr); +#else SetStringFromAny(NULL, objPtr); +#endif stringPtr = GET_STRING(objPtr); if (lengthPtr != NULL) { -- cgit v0.12