summaryrefslogtreecommitdiffstats
path: root/generic/tclIO.c
diff options
context:
space:
mode:
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;
}
/*