summaryrefslogtreecommitdiffstats
path: root/generic/tclVar.c
diff options
context:
space:
mode:
authorericm <ericm@noemail.net>2000-08-21 01:37:50 (GMT)
committerericm <ericm@noemail.net>2000-08-21 01:37:50 (GMT)
commit78dfed2a70b95b1783e088fb7b20875c768f89c9 (patch)
treefd4936346c5f2cd37275fa1a3958dd1742c575b2 /generic/tclVar.c
parent1413397f4e95161d97ff640b795fb017ec08cda6 (diff)
downloadtcl-78dfed2a70b95b1783e088fb7b20875c768f89c9.zip
tcl-78dfed2a70b95b1783e088fb7b20875c768f89c9.tar.gz
tcl-78dfed2a70b95b1783e088fb7b20875c768f89c9.tar.bz2
Added check for non-arrays for [array statistics].
FossilOrigin-Name: b857b66be3c7ad19c1ccaf6e8c50236f3a798c42
Diffstat (limited to 'generic/tclVar.c')
-rw-r--r--generic/tclVar.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/generic/tclVar.c b/generic/tclVar.c
index 8990ab8..8e431c7 100644
--- a/generic/tclVar.c
+++ b/generic/tclVar.c
@@ -14,7 +14,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.20 2000/07/25 22:41:05 ericm Exp $
+ * RCS: @(#) $Id: tclVar.c,v 1.21 2000/08/21 01:37:51 ericm Exp $
*/
#include "tclInt.h"
@@ -3228,6 +3228,11 @@ Tcl_ArrayObjCmd(dummy, interp, objc, objv)
case ARRAY_STATISTICS: {
char *stats;
+
+ if (notArray) {
+ goto error;
+ }
+
stats = Tcl_HashStats(varPtr->value.tablePtr);
if (stats != NULL) {
Tcl_SetResult(interp, stats, TCL_VOLATILE);