summaryrefslogtreecommitdiffstats
path: root/generic/tclListObj.c
diff options
context:
space:
mode:
authorrjohnson <rjohnson>1998-10-13 20:30:21 (GMT)
committerrjohnson <rjohnson>1998-10-13 20:30:21 (GMT)
commit2145c0e799d0659cd675a37728d7fb9c64f04904 (patch)
treea5274f70d346f2ba069c979b043ef055b8777e35 /generic/tclListObj.c
parent34fd6003c9fe9da83ffe806108ebbd4bbffb796e (diff)
downloadtcl-2145c0e799d0659cd675a37728d7fb9c64f04904.zip
tcl-2145c0e799d0659cd675a37728d7fb9c64f04904.tar.gz
tcl-2145c0e799d0659cd675a37728d7fb9c64f04904.tar.bz2
Fixed bug in Tcl_SetListObj - it used to create invalid Tcl_Obj if you passed
in 0 elements. Despite what docs said. Also updated a few copyright notices.
Diffstat (limited to 'generic/tclListObj.c')
-rw-r--r--generic/tclListObj.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/generic/tclListObj.c b/generic/tclListObj.c
index f636071..1b943a6 100644
--- a/generic/tclListObj.c
+++ b/generic/tclListObj.c
@@ -5,11 +5,12 @@
* type.
*
* Copyright (c) 1995-1997 Sun Microsystems, Inc.
+ * Copyright (c) 1998 by Scriptics Corporation.
*
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclListObj.c,v 1.2 1998/09/14 18:40:00 stanton Exp $
+ * RCS: @(#) $Id: tclListObj.c,v 1.3 1998/10/13 20:30:23 rjohnson Exp $
*/
#include "tclInt.h"
@@ -260,6 +261,8 @@ Tcl_SetListObj(objPtr, objc, objv)
objPtr->internalRep.otherValuePtr = (VOID *) listRepPtr;
objPtr->typePtr = &tclListType;
+ } else {
+ objPtr->bytes = tclEmptyStringRep;
}
}