have_first_byte now implies run_forward.
Change-Id: I88c88e17f7c3789744805c0039a67df7360d6b3e
Reviewed-on: https://code-review.googlesource.com/c/re2/+/56652
Reviewed-by: Paul Wankadia <junyer@google.com>
diff --git a/re2/dfa.cc b/re2/dfa.cc
index 6581aec..e0eb15d 100644
--- a/re2/dfa.cc
+++ b/re2/dfa.cc
@@ -1368,7 +1368,7 @@
if (ExtraDebug)
fprintf(stderr, "@%td: %s\n", p - bp, DumpState(s).c_str());
- if (run_forward && have_first_byte && s == start) {
+ if (have_first_byte && s == start) {
// In start state, only way out is to find first_byte,
// so use optimized assembly in memchr to skip ahead.
// If first_byte isn't found, we can skip to the end