projects
/
satune.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f179628
)
bug fix
author
bdemsky
<bdemsky@uci.edu>
Thu, 2 Aug 2018 19:47:43 +0000
(12:47 -0700)
committer
bdemsky
<bdemsky@uci.edu>
Thu, 2 Aug 2018 19:47:43 +0000
(12:47 -0700)
src/csolver.cc
patch
|
blob
|
history
diff --git
a/src/csolver.cc
b/src/csolver.cc
index b42dbe0974224df3560d5f95b96aed1e5fce56f2..58177a55647a3fe0f7f344955ccfbacf3efe2757 100644
(file)
--- a/
src/csolver.cc
+++ b/
src/csolver.cc
@@
-520,8
+520,14
@@
void CSolver::addConstraint(BooleanEdge constraint) {
BooleanLogic *b = (BooleanLogic *) constraint.getBoolean();
if (!constraint.isNegated()) {
if (b->op == SATC_AND) {
BooleanLogic *b = (BooleanLogic *) constraint.getBoolean();
if (!constraint.isNegated()) {
if (b->op == SATC_AND) {
- for (uint i = 0; i < b->inputs.getSize(); i++) {
- addConstraint(b->inputs.get(i));
+ uint size = b->inputs.getSize();
+ //Handle potential concurrent modification
+ BooleanEdge array[size];
+ for (uint i = 0; i < size; i++) {
+ array[i] = b->inputs.get(i);
+ }
+ for (uint i = 0; i < size; i++) {
+ addConstraint(array[i]);
}
return;
}
}
return;
}