summaryrefslogtreecommitdiffstats
path: root/generic/tclIO.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2014-10-10 19:56:06 (GMT)
committerdgp <dgp@users.sourceforge.net>2014-10-10 19:56:06 (GMT)
commit496675a4c4b6fa36e43aa4d8e08dbaad22f546b8 (patch)
tree6b0cf2164e32f959e5b775f4868958f9af0b985c /generic/tclIO.c
parent4a9b3360d211624e8cbf542a7a65b2f5c6f3b33a (diff)
parente059101eedfd4f4901b73f983842b9d1c6e45098 (diff)
downloadtcl-496675a4c4b6fa36e43aa4d8e08dbaad22f546b8.zip
tcl-496675a4c4b6fa36e43aa4d8e08dbaad22f546b8.tar.gz
tcl-496675a4c4b6fa36e43aa4d8e08dbaad22f546b8.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 2810372..9283bf5 100644
--- a/generic/tclIO.c
+++ b/generic/tclIO.c
@@ -3894,7 +3894,10 @@ Tcl_Write(
if (srcLen < 0) {
srcLen = strlen(src);
}
- return WriteBytes(chanPtr, src, srcLen);
+ if (WriteBytes(chanPtr, src, srcLen) < 0) {
+ return -1;
+ }
+ return srcLen;
}
/*