we can optimize matching by breaking loop when match becomes 0 :)

SVN revision: 67267
This commit is contained in:
Carsten Haitzler 2012-01-17 09:15:31 +00:00
parent ad3aca617f
commit a70fc50208
1 changed files with 5 additions and 1 deletions

View File

@ -4738,7 +4738,11 @@ _escaped_char_match(const char *s, int *adv)
while ((*mc) && (*sc))
{
if ((unsigned char)*sc < (unsigned char)*mc) return NULL;
if (*sc != *mc) match = 0;
if (*sc != *mc)
{
match = 0;
break;
}
mc++;
sc++;
}