diff options
author | msofer <msofer@noemail.net> | 2006-10-05 11:44:02 (GMT) |
---|---|---|
committer | msofer <msofer@noemail.net> | 2006-10-05 11:44:02 (GMT) |
commit | b2689e9eb4d0176311c41ad86f53c7877b6f9892 (patch) | |
tree | ba4a92d67736e1f763c04e3a89d081a7b45c8c87 /generic/tclVar.c | |
parent | 7dd46ec9a012e0d30b292a519074f42063d62fd5 (diff) | |
download | tcl-b2689e9eb4d0176311c41ad86f53c7877b6f9892.zip tcl-b2689e9eb4d0176311c41ad86f53c7877b6f9892.tar.gz tcl-b2689e9eb4d0176311c41ad86f53c7877b6f9892.tar.bz2 |
* generic/tclVar.c (Tcl_LappendObjCmd):
* tests/append.test(4.21-22): fix for longstanding [Bug 1570718],
lappending nothing to non-list. Reported by lvirden
FossilOrigin-Name: 6631da8060da6f46e008ef470b6e270a8ab3ca61
Diffstat (limited to 'generic/tclVar.c')
-rw-r--r-- | generic/tclVar.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/generic/tclVar.c b/generic/tclVar.c index c926e4e..c0dfdc3 100644 --- a/generic/tclVar.c +++ b/generic/tclVar.c @@ -15,7 +15,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclVar.c,v 1.69.2.11 2005/11/27 02:34:41 das Exp $ + * RCS: @(#) $Id: tclVar.c,v 1.69.2.12 2006/10/05 11:44:03 msofer Exp $ */ #include "tclInt.h" @@ -2764,7 +2764,14 @@ Tcl_LappendObjCmd(dummy, interp, objc, objv) if (newValuePtr == NULL) { return TCL_ERROR; } - } + } else { + int result; + + result = Tcl_ListObjLength(interp, newValuePtr, &numElems); + if (result != TCL_OK) { + return result; + } + } } else { /* * We have arguments to append. We used to call Tcl_SetVar2 to |