diff options
author | Andres Noetzli <andres.noetzli@gmail.com> | 2020-01-21 23:36:47 -0800 |
---|---|---|
committer | Andres Noetzli <andres.noetzli@gmail.com> | 2020-01-21 23:36:47 -0800 |
commit | 5b09e95f63e19940993b3301f1f7ceee62e2b2d5 (patch) | |
tree | fcc5b5ca55c200ddaaaf52824321390310b9b5d1 | |
parent | 3e3883200b02e706da643f031172a798b055ddec (diff) |
Fix edge case
-rw-r--r-- | src/theory/strings/regexp_elim.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/theory/strings/regexp_elim.cpp b/src/theory/strings/regexp_elim.cpp index c8ca000e9..986ab7d66 100644 --- a/src/theory/strings/regexp_elim.cpp +++ b/src/theory/strings/regexp_elim.cpp @@ -383,7 +383,7 @@ Node RegExpElimination::eliminateConcat(Node atom) if (r == 0) { rexpElimChildrenStart = index; - if (index == rexpElimChildrenEnd) { + if (index == nchildren) { break; } } @@ -395,8 +395,9 @@ Node RegExpElimination::eliminateConcat(Node atom) if (!sConstraints.empty()) { - std::vector<Node> rexpElimChildren(children.begin() + rexpElimChildrenStart, - children.begin() + rexpElimChildrenEnd); + std::vector<Node> rexpElimChildren( + children.begin() + rexpElimChildrenStart, + children.begin() + rexpElimChildrenEnd + 1); if (!rexpElimChildren.empty()) { Node ss = nm->mkNode(STRING_SUBSTR, x, sStartIndex, sLength); |