summaryrefslogtreecommitdiffstats
path: root/generic/tclEnv.c
diff options
context:
space:
mode:
authorhobbs <hobbs>1999-10-29 03:03:59 (GMT)
committerhobbs <hobbs>1999-10-29 03:03:59 (GMT)
commit92efc11980dd19d497d47daca03f5082a28a63f4 (patch)
tree2550a48f32cd8d0e46db002b52b75fa1deff247a /generic/tclEnv.c
parentbba32831be50692711739fc652d23c4d3e258c9e (diff)
downloadtcl-92efc11980dd19d497d47daca03f5082a28a63f4.zip
tcl-92efc11980dd19d497d47daca03f5082a28a63f4.tar.gz
tcl-92efc11980dd19d497d47daca03f5082a28a63f4.tar.bz2
* generic/tclStringObj.c: fixed Tcl_AppendResultVA so it only
iterates once over the va_list (avoiding a memcpy of it, which is not portable). * generic/tclEnv.c: fixed possible ABR error in environ array * tests/scan.test: * generic/tclScan.c: added support for use of inline scan, XPG3 currently not included * tests/incr.test: * tests/set.test: * generic/tclCompCmds.c: fixed improper bytecode handling of 'eval {set array($unknownvar) 5}' (also for incr) * win/tclWinTest.c: added testvolumetype command, as atime is completely ignored for Windows FAT file systems * win/tclWinPort.h: added sys/utime.h to includes * unix/tclUnixPort.h: added utime.h to includes * doc/file.n: * tests/cmdAH.test: * generic/tclCmdAH.c: added time arguments to atime and mtime file command methods (support 'touch' functionality)
Diffstat (limited to 'generic/tclEnv.c')
-rw-r--r--generic/tclEnv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclEnv.c b/generic/tclEnv.c
index f601da5..49984c9 100644
--- a/generic/tclEnv.c
+++ b/generic/tclEnv.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclEnv.c,v 1.5 1999/10/13 00:32:17 hobbs Exp $
+ * RCS: @(#) $Id: tclEnv.c,v 1.6 1999/10/29 03:04:00 hobbs Exp $
*/
#include "tclInt.h"
@@ -251,7 +251,7 @@ TclSetEnv(name, value)
* update the string in the cache.
*/
- if (environ[index] == p) {
+ if ((index != -1) && (environ[index] == p)) {
ReplaceString(oldValue, p);
}