Skip to content

Commit

Permalink
Check onepass_nodes_.data(), not .size().
Browse files Browse the repository at this point in the history
Change-Id: I3631f239183b5e1c2defa7fd18ba1a05e76e307b
Reviewed-on: https://code-review.googlesource.com/c/38511
Reviewed-by: Paul Wankadia <[email protected]>
  • Loading branch information
junyer committed Feb 25, 2019
1 parent c4bce68 commit c9d5e15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion re2/onepass.cc
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ struct InstCond {
// Constructs and saves corresponding one-pass NFA on success.
bool Prog::IsOnePass() {
if (did_onepass_)
return onepass_nodes_.size() > 0;
return onepass_nodes_.data() != NULL;
did_onepass_ = true;

if (start() == 0) // no match
Expand Down

0 comments on commit c9d5e15

Please sign in to comment.