summaryrefslogtreecommitdiffstats
path: root/generic/tclIndexObj.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2006-04-05 15:17:37 (GMT)
committerdgp <dgp@users.sourceforge.net>2006-04-05 15:17:37 (GMT)
commit1aa54c04958fb5a081acbd1440314021b21ca394 (patch)
tree4f7d720b80a5b9e2bf3554c2d14d3981fe3e8b5a /generic/tclIndexObj.c
parent04756a2aabf90528f4c03ce5f69e76ac056ded7a (diff)
downloadtcl-1aa54c04958fb5a081acbd1440314021b21ca394.zip
tcl-1aa54c04958fb5a081acbd1440314021b21ca394.tar.gz
tcl-1aa54c04958fb5a081acbd1440314021b21ca394.tar.bz2
* generic/tclIndexObj.c (Tcl_GetIndexFromObjStruct): Allow empty
strings to be matched by the Tcl_GetIndexFromObj machinery, in the same manner as any other key. [Bug 1464039]
Diffstat (limited to 'generic/tclIndexObj.c')
-rw-r--r--generic/tclIndexObj.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/generic/tclIndexObj.c b/generic/tclIndexObj.c
index bdd291c..be60517 100644
--- a/generic/tclIndexObj.c
+++ b/generic/tclIndexObj.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclIndexObj.c,v 1.29 2006/04/05 12:48:25 dkf Exp $
+ * RCS: @(#) $Id: tclIndexObj.c,v 1.30 2006/04/05 15:17:39 dgp Exp $
*/
#include "tclInt.h"
@@ -223,14 +223,10 @@ Tcl_GetIndexFromObjStruct(
}
/*
- * Check if we were instructed to disallow abbreviations. Note that we do
- * not allow the empty string as an abbreviation of anything; it is only
- * processed by this function as a non-error case if the table of strings
- * has an entry in it that is itself an empty string. This only matters in
- * the case where the table has a singleton entry.
+ * Check if we were instructed to disallow abbreviations.
*/
- if ((flags & TCL_EXACT) || (key[0] == '\0') || (numAbbrev != 1)) {
+ if ((flags & TCL_EXACT) || (numAbbrev != 1)) {
goto error;
}