summaryrefslogtreecommitdiffstats
path: root/generic/tclIO.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2014-10-10 19:54:19 (GMT)
committerdgp <dgp@users.sourceforge.net>2014-10-10 19:54:19 (GMT)
commite059101eedfd4f4901b73f983842b9d1c6e45098 (patch)
tree65caada1b2bf70676244dc780459125ded54e824 /generic/tclIO.c
parent1159aa03c57e16b943f56f65272a590c5b1f0d50 (diff)
downloadtcl-e059101eedfd4f4901b73f983842b9d1c6e45098.zip
tcl-e059101eedfd4f4901b73f983842b9d1c6e45098.tar.gz
tcl-e059101eedfd4f4901b73f983842b9d1c6e45098.tar.bz2
[bf7135428c] Restore the Tcl_Write() return value logic.
Diffstat (limited to 'generic/tclIO.c')
-rw-r--r--generic/tclIO.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c
index 2fd3792..d1f22c1 100644
--- a/generic/tclIO.c
+++ b/generic/tclIO.c
@@ -3484,7 +3484,10 @@ Tcl_Write(
if (srcLen < 0) {
srcLen = strlen(src);
}
- return WriteBytes(chanPtr, src, srcLen);
+ if (WriteBytes(chanPtr, src, srcLen) < 0) {
+ return -1;
+ }
+ return srcLen;
}
/*