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

Diff of /code/trunk/pcre_exec.c

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

revision 691 by ph10, Sun Sep 11 14:31:21 2011 UTC revision 699 by ph10, Tue Sep 20 10:46:54 2011 UTC
# Line 1275  for (;;) Line 1275  for (;;)
1275        {        {
1276        if (op == OP_SCOND) md->match_function_type = MATCH_CBEGROUP;        if (op == OP_SCOND) md->match_function_type = MATCH_CBEGROUP;
1277        RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, md, eptrb, RM49);        RMATCH(eptr, ecode + 1 + LINK_SIZE, offset_top, md, eptrb, RM49);
1278        if (rrc == MATCH_THEN && md->start_match_ptr == ecode)  
1279          rrc = MATCH_NOMATCH;        /* If the result is THEN from within the "true" branch of the condition,
1280          md->start_match_ptr will point to the original OP_COND, not to the start
1281          of the branch, so we have do work to see if it matches. If THEN comes
1282          from the "false" branch, md->start_match_ptr does point to OP_ALT. */
1283    
1284          if (rrc == MATCH_THEN)
1285            {
1286            if (*ecode != OP_ALT)
1287              {
1288              do ecode += GET(ecode, 1); while (*ecode == OP_ALT);
1289              ecode -= GET(ecode, 1);
1290              }
1291            if (md->start_match_ptr == ecode) rrc = MATCH_NOMATCH;
1292            }
1293        RRETURN(rrc);        RRETURN(rrc);
1294        }        }
1295      else                         /* Condition false & no alternative */      else                         /* Condition false & no alternative */

Legend:
Removed from v.691  
changed lines
  Added in v.699

  ViewVC Help
Powered by ViewVC 1.1.5