diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-07-12 12:23:54 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2022-07-12 12:23:54 (GMT) |
commit | f55203403c6ec05a55134dcfea129095e91c098e (patch) | |
tree | 261f3851508bcf96962e18f5329114583a0096b4 | |
parent | a6ed76df7c2b1d8c8f3296a99023f88fc76c3f04 (diff) | |
download | tcl-f55203403c6ec05a55134dcfea129095e91c098e.zip tcl-f55203403c6ec05a55134dcfea129095e91c098e.tar.gz tcl-f55203403c6ec05a55134dcfea129095e91c098e.tar.bz2 |
Fix [b79df322a9] follow-up: Tcl_NewUnicodeObj truncates strings
-rw-r--r-- | generic/tclStringObj.c | 4 |
1 files changed, 4 insertions, 0 deletions
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) { |