summaryrefslogtreecommitdiffstats
path: root/generic/tclEncoding.c
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2025-05-29 15:10:40 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2025-05-29 15:10:40 (GMT)
commitebff9819e938d250960319a760883dfd30389be3 (patch)
tree287d9894b062e2e3746a1bec8bc31662d01da6e8 /generic/tclEncoding.c
parentc4d746554b140b56bbd49e70503ffff2abcb1e10 (diff)
parent59040bcaaaedf28740e64e76c0a798f197caf017 (diff)
downloadtcl-ebff9819e938d250960319a760883dfd30389be3.zip
tcl-ebff9819e938d250960319a760883dfd30389be3.tar.gz
tcl-ebff9819e938d250960319a760883dfd30389be3.tar.bz2
merge trunk
Diffstat (limited to 'generic/tclEncoding.c')
-rw-r--r--generic/tclEncoding.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c
index 5002b87..418317f 100644
--- a/generic/tclEncoding.c
+++ b/generic/tclEncoding.c
@@ -1228,7 +1228,7 @@ Tcl_ExternalToUtfDStringEx(
* and loop. Otherwise, return the result we got.
*/
if ((result != TCL_CONVERT_NOSPACE) &&
- !(result == TCL_CONVERT_MULTIBYTE && (flags & TCL_ENCODING_END))) {
+ (result != TCL_CONVERT_MULTIBYTE || (flags & TCL_ENCODING_END))) {
Tcl_Size nBytesProcessed = (src - srcStart);
Tcl_DStringSetLength(dstPtr, soFar);
@@ -1544,7 +1544,7 @@ Tcl_UtfToExternalDStringEx(
* and loop. Otherwise, return the result we got.
*/
if ((result != TCL_CONVERT_NOSPACE) &&
- !(result == TCL_CONVERT_MULTIBYTE && (flags & TCL_ENCODING_END))) {
+ (result != TCL_CONVERT_MULTIBYTE || (flags & TCL_ENCODING_END))) {
Tcl_Size nBytesProcessed = (src - srcStart);
Tcl_Size i = soFar + encodingPtr->nullSize - 1;
/* Loop as DStringSetLength only stores one nul byte at a time */