* Fixed problem with 'var' command.  Variables with similar names
  sometimes are confused.

diff --git a/tcl_commands.c b/tcl_commands.c
index a127960..cde6c5b 100644
--- a/tcl_commands.c
+++ b/tcl_commands.c
@@ -536,7 +536,9 @@
            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)))
 	    {
 		/* The following makes sure that we get one string,
                    with no sub lists. */