"yahalom emet" <[EMAIL PROTECTED]> writes:

> continuing the bug of "var get" that was fixed in version 0.11.6
> also "var exist" show the same behaviour. I get 1 for "var exist"
> when I check existance of a varibale that starts with the letter of
> another variable.

Patch:

@@ -571,7 +571,9 @@
         /* This isn't real efficient - move to hash table later on. */
        for (i = 0; i < parmsarray->nelts; ++i)
        {
-           if (!strncmp(key, StringToUtf(parms[i].key, POOL), strlen(key)))
+           if (!strncmp(key, StringToUtf(parms[i].key, POOL),
+                        strlen(key) < strlen(parms[i].key) ?
+                        strlen(parms[i].key) : strlen(key)))
            {
                result = Tcl_NewIntObj(1);
                Tcl_IncrRefCount(result);
@@ -595,7 +597,9 @@
         /* This isn't real efficient - move to hash table later on. */
        for (i = 0; i < parmsarray->nelts; ++i)
        {
-           if (!strncmp(key, StringToUtf(parms[i].key, POOL), strlen(key)))
+           if (!strncmp(key, StringToUtf(parms[i].key, POOL), 
+                        strlen(key) < strlen(parms[i].key) ?
+                        strlen(parms[i].key) : strlen(key)))
            {
                if (result == NULL)
                {

Upload coming soon.

Thankyou for taking the time to point this out!

-- 
David N. Welton
   Consulting: http://www.dedasys.com/
     Personal: http://www.dedasys.com/davidw/
Free Software: http://www.dedasys.com/freesoftware/
   Apache Tcl: http://tcl.apache.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to