On Tue, Aug 25, 2015 at 4:31 PM, Bram Moolenaar <[email protected]> wrote: > *************** > *** 5068,5086 **** > if (s1 == NULL || s2 == NULL) > return FALSE; > > ! if (STRLEN(s1) != STRLEN(s2)) > ! return FAIL; > ! > ! for (i = 0; s1[i] != NUL && s2[i] != NUL; i += MB_PTR2LEN(s1 + i)) > { > int c1 = PTR2CHAR(s1 + i); > ! int c2 = PTR2CHAR(s2 + i); > > if ((p_fic ? MB_TOLOWER(c1) != MB_TOLOWER(c2) : c1 != c2) > && (prev1 != '*' || prev2 != '*')) > return FAIL; > prev2 = prev1; > prev1 = c1; > } > return TRUE; > } > --- 5068,5086 ---- > if (s1 == NULL || s2 == NULL) > return FALSE; > > ! for (i = 0, j = 0; s1[i] != NUL;) > { > int c1 = PTR2CHAR(s1 + i); > ! int c2 = PTR2CHAR(s2 + j); > > if ((p_fic ? MB_TOLOWER(c1) != MB_TOLOWER(c2) : c1 != c2) > && (prev1 != '*' || prev2 != '*')) > return FAIL; > prev2 = prev1; > prev1 = c1; > + > + i += MB_PTR2LEN(s1 + i); > + j += MB_PTR2LEN(s2 + j); > } > return TRUE; > }
Was the test for s2[j] != NUL left out intentionally, or does another code path catch that one? Christ van Willegen -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
