summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorsurles <surles>1999-03-12 23:47:49 (GMT)
committersurles <surles>1999-03-12 23:47:49 (GMT)
commit9baa5bff02e50183162a1ca5ae22a44abcb05d52 (patch)
tree624dea38fd1ab17f5ca928a59a2168f8d427c001 /generic
parent22a6cb8d88b53397e82dd774d82f128b60d85890 (diff)
downloadtcl-9baa5bff02e50183162a1ca5ae22a44abcb05d52.zip
tcl-9baa5bff02e50183162a1ca5ae22a44abcb05d52.tar.gz
tcl-9baa5bff02e50183162a1ca5ae22a44abcb05d52.tar.bz2
modified the Tcl_SetDefaultEncodingDir routine to use its own memory when caching the tclDefaultEncodingDir variable.
Diffstat (limited to 'generic')
-rw-r--r--generic/tclEncoding.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c
index ca3516b..7917e85 100644
--- a/generic/tclEncoding.c
+++ b/generic/tclEncoding.c
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclEncoding.c,v 1.1.2.7 1999/03/12 23:29:13 surles Exp $
+ * RCS: @(#) $Id: tclEncoding.c,v 1.1.2.8 1999/03/12 23:47:49 surles Exp $
*/
#include "tclInt.h"
@@ -361,7 +361,8 @@ void
Tcl_SetDefaultEncodingDir(path)
char *path;
{
- tclDefaultEncodingDir = path;
+ tclDefaultEncodingDir = (char *)ckalloc((unsigned) strlen(path) + 1);
+ strcpy(tclDefaultEncodingDir, path);
}
/*