summaryrefslogtreecommitdiffstats
path: root/generic/tclIO.c
diff options
context:
space:
mode:
authordkf <dkf@noemail.net>2004-09-10 20:06:40 (GMT)
committerdkf <dkf@noemail.net>2004-09-10 20:06:40 (GMT)
commita82aedecf24f0dadf2f4951af0d79aaaf3ab80e0 (patch)
treeec18d8290de3bf188e7047f85e699995a4f62157 /generic/tclIO.c
parentff3e8f48025c217dc8099b82e01becf805c8aad1 (diff)
downloadtcl-a82aedecf24f0dadf2f4951af0d79aaaf3ab80e0.zip
tcl-a82aedecf24f0dadf2f4951af0d79aaaf3ab80e0.tar.gz
tcl-a82aedecf24f0dadf2f4951af0d79aaaf3ab80e0.tar.bz2
Fix [Bug 1025359] to make sure wide seeks don't lose errors
FossilOrigin-Name: ffbedbe75de76f55a309aaaff3598af278060aa0
Diffstat (limited to 'generic/tclIO.c')
-rw-r--r--generic/tclIO.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c
index 154bec0..054cc89 100644
--- a/generic/tclIO.c
+++ b/generic/tclIO.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclIO.c,v 1.61.2.7 2004/07/15 20:46:18 andreas_kupries Exp $
+ * RCS: @(#) $Id: tclIO.c,v 1.61.2.8 2004/09/10 20:06:41 dkf Exp $
*/
#include "tclInt.h"
@@ -5544,15 +5544,15 @@ Tcl_Seek(chan, offset, mode)
offset, mode, &result);
} else if (offset < Tcl_LongAsWide(LONG_MIN) ||
offset > Tcl_LongAsWide(LONG_MAX)) {
- Tcl_SetErrno(EOVERFLOW);
+ result = EOVERFLOW;
curPos = Tcl_LongAsWide(-1);
} else {
curPos = Tcl_LongAsWide((chanPtr->typePtr->seekProc) (
chanPtr->instanceData, Tcl_WideAsLong(offset), mode,
&result));
- if (curPos == Tcl_LongAsWide(-1)) {
- Tcl_SetErrno(result);
- }
+ }
+ if (curPos == Tcl_LongAsWide(-1)) {
+ Tcl_SetErrno(result);
}
}