Make the anchored branch more similar to the floating branch by using s to
hold the start position for fbm rather than t. Should be functionally
equivalent.
Note that on failure in the anchored branch, we leave with t holding a
different value than before, but it shouldn't matter, since the value of t
is only used in the success case.
NOOP;
else
t = strpos;
- t = HOP3c(t, prog->anchored_offset, strend);
- if (t < other_last) /* These positions already checked */
- t = other_last;
+
+ s = HOP3c(t, prog->anchored_offset, strend);
+ if (s < other_last) /* These positions already checked */
+ s = other_last;
assert(prog->minlen > prog->anchored_offset);
last2 = last1 = HOP3c(strend,
must = utf8_target ? prog->anchored_utf8 : prog->anchored_substr;
assert(SvPOK(must));
s = fbm_instr(
- (unsigned char*)t,
+ (unsigned char*)s,
HOP3(last1 + SvCUR(must), -(SvTAIL(must)!=0), strbeg),
must,
multiline ? FBMrf_MULTILINE : 0