psykose <al...@ayaya.dev> ha escrit:

> str[strlen(str)] returns the NUL byte, not the last character.

That's irrelevant.  kwlen below is *not* the length of keyword, but
that of p->keyword:

>       size_t kwlen = strlen (p->keyword);
> -     if (strncmp (p->keyword, keyword, kwlen) == 0 && keyword[kwlen] == '.')
> +     if (strncmp (p->keyword, keyword, kwlen) == 0 && keyword[kwlen - 1] == 
> '.')

That patch actually breaks the functionality, instead of fixing it.

Regards,
Sergey

Reply via email to