fix fencepost error when merging regions
This commit is contained in:
parent
e2aa4a3ee7
commit
025b1c9333
@ -574,7 +574,7 @@ function connectRegions(knife: Knife) {
|
|||||||
|
|
||||||
if (Math.random() > EXTRA_CONNECTOR_CHANCE) {
|
if (Math.random() > EXTRA_CONNECTOR_CHANCE) {
|
||||||
// at random, don't regard them as merged
|
// at random, don't regard them as merged
|
||||||
for (let i = 0; i < knife.region; i++) {
|
for (let i = 0; i <= knife.region; i++) {
|
||||||
if (sources.indexOf(merged[i]) != -1) {
|
if (sources.indexOf(merged[i]) != -1) {
|
||||||
merged[i] = dest;
|
merged[i] = dest;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user