diff options
author | dgp <dgp@noemail.net> | 2006-04-05 15:16:46 (GMT) |
---|---|---|
committer | dgp <dgp@noemail.net> | 2006-04-05 15:16:46 (GMT) |
commit | 643c35b7f419b37c93a09d6c349e9a6096d0d6f1 (patch) | |
tree | 667b3d1bc8a2e6c36298009343029b89ddd38dfd /generic/tclIndexObj.c | |
parent | 597b8987b22e9245dcb95d9d5f7799c401a8619d (diff) | |
download | tcl-643c35b7f419b37c93a09d6c349e9a6096d0d6f1.zip tcl-643c35b7f419b37c93a09d6c349e9a6096d0d6f1.tar.gz tcl-643c35b7f419b37c93a09d6c349e9a6096d0d6f1.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]
FossilOrigin-Name: 50a49e4b26f2195f5f11e6e255bc63295b79aab6
Diffstat (limited to 'generic/tclIndexObj.c')
-rw-r--r-- | generic/tclIndexObj.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/generic/tclIndexObj.c b/generic/tclIndexObj.c index 7bc046d..f22e7d4 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.16.2.3 2006/04/05 13:20:09 dkf Exp $ + * RCS: @(#) $Id: tclIndexObj.c,v 1.16.2.4 2006/04/05 15:17:05 dgp Exp $ */ #include "tclInt.h" @@ -227,13 +227,9 @@ Tcl_GetIndexFromObjStruct(interp, objPtr, tablePtr, offset, msg, flags, } } /* - * 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; } |