diff options
author | ericm <ericm> | 2000-03-31 19:39:41 (GMT) |
---|---|---|
committer | ericm <ericm> | 2000-03-31 19:39:41 (GMT) |
commit | 64afb60385be9d09aa64657ebc5bdc6c6d669074 (patch) | |
tree | 2d64c5f88a5d280114bdb5ec4b8455753a3a5384 /generic/tclGet.c | |
parent | bfc465013806bbc8b695f2bbe20707a6b25ad961 (diff) | |
download | tcl-64afb60385be9d09aa64657ebc5bdc6c6d669074.zip tcl-64afb60385be9d09aa64657ebc5bdc6c6d669074.tar.gz tcl-64afb60385be9d09aa64657ebc5bdc6c6d669074.tar.bz2 |
* generic/tclGet.c (Tcl_GetDouble): Added additional conditions to
error test (previously only errno was checked, but the return
value of strtod() should be checked as well). [Bug: 4118].
* tests/exec.test: Added test for proper conversion of UTF data
when used with "<< $dataWithUTF" on exec's.
* unix/tclUnixPipe.c (TclpCreateTempFile): Added
Tcl_UtfToExternalDString call, so that if there is UTF content in
the string it will be properly converted to the system encoding
before being written [Bug: 4030].
(TclpCreateTempFile): Added a check on the return value of tmpnam;
some systems (Linux, for example) will start to return NULL after
tmpnam has been called TMP_MAX times; not checking for this can
have bad results (overwriting temp files, core dumps, etc.)
Diffstat (limited to 'generic/tclGet.c')
-rw-r--r-- | generic/tclGet.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/generic/tclGet.c b/generic/tclGet.c index 69cf503..aa60799 100644 --- a/generic/tclGet.c +++ b/generic/tclGet.c @@ -11,11 +11,12 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclGet.c,v 1.5 1999/12/04 06:15:41 hobbs Exp $ + * RCS: @(#) $Id: tclGet.c,v 1.6 2000/03/31 19:39:42 ericm Exp $ */ #include "tclInt.h" #include "tclPort.h" +#include "tclMath.h" /* @@ -222,7 +223,7 @@ Tcl_GetDouble(interp, string, doublePtr) } return TCL_ERROR; } - if (errno != 0) { + if (errno != 0 && (d == HUGE_VAL || d == -HUGE_VAL || d == 0)) { if (interp != (Tcl_Interp *) NULL) { TclExprFloatError(interp, d); } |