.
D 2006-04-04T07:56:10
J assignee dgp
J cmimetype text/plain
J comment See\sTk\sbug\s1463233\sfor\smore\sdetails:\n\nhttps://sourceforge.net/tracker/?func=detail&atid=112997&aid=1463233&group_id=12997\n\nBasically,\sTk's\stext\swidget\stag\soption\sconfiguration\nallows\s(naturally)\sthe\sempty\sstring\sas\sa\svalid\nconfiguration\svalue\s(to\sindicate\sthat\sthe\stag\sdoes\snot\noverride\sthe\stext\swidget\sfor\sthat\sitem).\s\sThis\sworks\nfor\sall\sother\sconfiguration\stypes,\sbut\snot\sfor\sindices\nfrom\sstring\slists.\s\sThe\sroot\scause\sof\sthe\sproblem\sis\nthat\sTcl_GetIndexFromObj\sthrows\san\serror\sin\sthis\scase,\neven\sthough\sthere\sis\san\sexact\smatch\savailable\s(and\nnowhere\sin\sthe\sdocumentation\sis\sit\sstated\sthat\san\sexact\nmatch\swill\snot\sbe\sfound\sfor\sthe\sspecial\scase\sof\san\nempty\sstring).\n\nAn\sapparent\sfix\swould\sbe:\n\n\s\s\s\s\s/*\n\s\s\s\s\s\s*\sThe\skey\sshould\snot\sbe\sempty,\sotherwise\sit's\snot\sa\nmatch.\n\s\s\s\s\s\s*/\n\s\s\s\s\s\n\s\s\s\s\sif\s(key[0]\s==\s'\\0')\s{\n+\n+\s\s\s\s\s\s\s\s/*\n+\s\s\s\s\s\s\s\s\s*\sCheck\sfor\sspecial\scase\sof\s""\sin\sstring\ntable.\n+\s\s\s\s\s\s\s\s\s*/\n+\s\s\s\s\s\s\s\sfor\s(entryPtr\s=\stablePtr,\si\s=\s0;\s*entryPtr\s!=\nNULL;\s\n+\s\s\s\s\s\s\s\s\s\s\sentryPtr\s=\sNEXT_ENTRY(entryPtr,\soffset),\si++)\s{\n+\s\s\s\s\s\s\s\s\s\s\s\sif\s(**entryPtr\s==\s'\\0')\s{\n+\s\s\s\s\s\s\s\s\s\s\s\s\s\s\sindex\s=\si;\n+\s\s\s\s\s\s\s\s\s\s\s\s\s\s\sgoto\sdone;\n+\s\s\s\s\s\s\s\s\s\s\s\s}\n+\s\s\s\s\s\s\s\s}\n+\n\s\s\s\s\s\s\s\sgoto\serror;\n\s\s\s\s\s}\n\s\s\s\s\s\n\s\s\s\s\s/*\n\s\s\s\s\s\s*\sScan\sthe\stable\slooking\sfor\sone\sof:\n\nNote\sthat\sthis\sdoes\sNOT\sgive\sthe\sempty\sstring\sany\nspecial\streatment\s-\sit\ssimply\sequalises\sthe\streatment\nwith\swhat\shappens\swith\sany\sother\sprefix\sstring.\s\sIf\nthere\sis\san\sexact\smatch\sto\sany\sprefix\sstring\sit\sis\naccepted,\seven\sif\sthere\sare\slonger\sstrings\swhich\scould\nalso\smatch.\n\nVince.\n\n\n
J foundin obsolete:\s8.5a4
J priority 7\sHigh
J resolution None
J status Open
J submitter vincentdarley
J subsystem 13.\sIndex\sObject
J title Tcl_GetIndexFromObj\sdoesn't\slike\szero\slength\sstrings
J type Bug
K 1464039fffffffffffffffffffffffffffffffff
U vincentdarley
Z 97b44f8b6074f8c414ff0a982fc5d71d