Skip to content

Commit d63b833

Browse files
committed
Neaten up
Move initialization of r and r1 next to each other.
1 parent 8574350 commit d63b833

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/regexp/exec.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -432,14 +432,14 @@ func (re *Regexp) doOnePass(ir io.RuneReader, ib []byte, is string, pos, ncap in
432432
}
433433

434434
r, width = i.step(pos)
435+
if r != endOfText {
436+
r1, width1 = i.step(pos + width)
437+
}
435438
if pos == 0 {
436439
flag = newLazyFlag(-1, r)
437440
} else {
438441
flag = i.context(pos)
439442
}
440-
if r != endOfText {
441-
r1, width1 = i.step(pos + width)
442-
}
443443
for {
444444
inst = re.onepass.Inst[pc]
445445
pc = int(inst.Out)

0 commit comments

Comments
 (0)