/[pcre]/code/trunk/pcre_compile.c
ViewVC logotype

Diff of /code/trunk/pcre_compile.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 405 by ph10, Fri Mar 20 11:22:42 2009 UTC revision 406 by ph10, Mon Mar 23 12:05:43 2009 UTC
# Line 1663  for (code = first_significant_code(code Line 1663  for (code = first_significant_code(code
1663      {      {
1664      BOOL empty_branch;      BOOL empty_branch;
1665      if (GET(code, 1) == 0) return TRUE;    /* Hit unclosed bracket */      if (GET(code, 1) == 0) return TRUE;    /* Hit unclosed bracket */
1666    
1667      /* If a conditional group has only one branch, there is a second, implied,      /* If a conditional group has only one branch, there is a second, implied,
1668      empty branch, so just skip over the conditional, because it could be empty.      empty branch, so just skip over the conditional, because it could be empty.
1669      Otherwise, scan the individual branches of the group. */      Otherwise, scan the individual branches of the group. */
1670    
1671      if (c == OP_COND && code[GET(code, 1)] != OP_ALT)      if (c == OP_COND && code[GET(code, 1)] != OP_ALT)
1672        code += GET(code, 1);        code += GET(code, 1);
1673      else      else
1674        {        {
1675        empty_branch = FALSE;        empty_branch = FALSE;
1676        do        do
1677          {          {
# Line 1682  for (code = first_significant_code(code Line 1682  for (code = first_significant_code(code
1682        while (*code == OP_ALT);        while (*code == OP_ALT);
1683        if (!empty_branch) return FALSE;   /* All branches are non-empty */        if (!empty_branch) return FALSE;   /* All branches are non-empty */
1684        }        }
1685    
1686      c = *code;      c = *code;
1687      continue;      continue;
1688      }      }

Legend:
Removed from v.405  
changed lines
  Added in v.406

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12