summaryrefslogtreecommitdiff
path: root/src/theory/strings/theory_strings.cpp
diff options
context:
space:
mode:
authorTim King <taking@cs.nyu.edu>2017-09-11 08:55:56 -0700
committerGitHub <noreply@github.com>2017-09-11 08:55:56 -0700
commitb8465bf303d4a3b9edb4bf5601a727e9e29828d9 (patch)
treebc268f7ed28ec0bcf9924e8af6f308bdc5d755e0 /src/theory/strings/theory_strings.cpp
parentd5b0866bd2a2551143caf591d453993ab5a48840 (diff)
Addressing a coverity scan complaint in theory_strings.cpp. I believe the root cause is that d_normal_forms_exp[r[0]] could have referred to different vectors (as operator[] is inserting for maps). (#1080)
Diffstat (limited to 'src/theory/strings/theory_strings.cpp')
-rw-r--r--src/theory/strings/theory_strings.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/theory/strings/theory_strings.cpp b/src/theory/strings/theory_strings.cpp
index 412cc727d..c035fe7e4 100644
--- a/src/theory/strings/theory_strings.cpp
+++ b/src/theory/strings/theory_strings.cpp
@@ -4008,7 +4008,8 @@ Node TheoryStrings::normalizeRegexp(Node r) {
if(d_normal_forms.find( r[0] ) != d_normal_forms.end()) {
nf_r = mkConcat( d_normal_forms[r[0]] );
Debug("regexp-nf") << "Term: " << r[0] << " has a normal form " << nf_r << std::endl;
- nf_exp.insert(nf_exp.end(), d_normal_forms_exp[r[0]].begin(), d_normal_forms_exp[r[0]].end());
+ const std::vector<Node>& r0_exp = d_normal_forms_exp[r[0]];
+ nf_exp.insert(nf_exp.end(), r0_exp.begin(), r0_exp.end());
nf_r = Rewriter::rewrite( NodeManager::currentNM()->mkNode(kind::STRING_TO_REGEXP, nf_r) );
}
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback