mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 01:41:22 +01:00
fix: issue with feature vertex being out of bound
This commit is contained in:
parent
949a486bf8
commit
84c326e347
4 changed files with 7 additions and 7 deletions
|
|
@ -158,7 +158,7 @@ function connectVertices({vertices, startingVertex, ofSameType, addToChecked, cl
|
|||
else if (v2 !== previous && c2 !== c3) next = v2;
|
||||
else if (v3 !== previous && c1 !== c3) next = v3;
|
||||
|
||||
if (!vertices.c[next]) {
|
||||
if (next >= vertices.c.length) {
|
||||
ERROR && console.error("ConnectVertices: next vertex is out of bounds");
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue