if (ptr->ptr[i] == '.')
i++;
if (strncasecmp (ptr->ptr + i, from, from_len) == 0
- && ! isalnum (ptr->ptr[i + from_len]))
+ && (ptr->len == (i + from_len || ! isalnum (ptr->ptr[i + from_len]))))
depth++;
if (strncasecmp (ptr->ptr + i, to, to_len) == 0
- && ! isalnum (ptr->ptr[i + to_len]))
+ && (ptr->len == (i + to_len) || ! isalnum (ptr->ptr[i + to_len])))
{
depth--;
if (depth == 0)