summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortomsmeding <tom.smeding@gmail.com>2019-02-17 00:13:12 +0100
committertomsmeding <tom.smeding@gmail.com>2019-02-17 00:13:12 +0100
commitfa4483dc336deafea36768e1e8a804e9d0ae823d (patch)
tree3085afa6624f9889f356ef827c58e3c1984754f8
parent233cbed8c9e1d08cc4abac060452b2cf643b4c7f (diff)
Bugfix removeEdgeCell
-rw-r--r--board.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/board.cpp b/board.cpp
index b3820a0..91655dc 100644
--- a/board.cpp
+++ b/board.cpp
@@ -94,7 +94,7 @@ void Board::newEdgeCand(int idx) {
void Board::removeEdgeCell(int idx) {
// cerr << "(removeEdgeCell(" << Idx(idx) << "))" << endl;
int pos = inEdgeCells[idx];
- if (pos != -1) {
+ if (pos != -1 && (bd[idx] != 0 || !checkEdge(idx))) {
inEdgeCells[idx] = -1;
if ((unsigned)pos < edgeCells.size() - 1) {
int val = edgeCells[pos] = edgeCells.back();