Merge branch 'dev' into lrossman-dev

This commit is contained in:
Lew Rossman
2018-11-07 23:19:16 -05:00
committed by GitHub
4 changed files with 83 additions and 36 deletions

View File

@@ -3209,6 +3209,9 @@ int DLLEXPORT EN_setlinknodes(EN_ProjectHandle ph, int index, int node1, int nod
int type;
EN_Project *p = (EN_Project*)ph;
EN_Network *net = &p->network;
// Check that end and start nodes are not the same
if (node1 == node2) return set_error(p->error_handle, 222);
// Check that nodes exist
if (node1 < 0 || node1 > net->Nnodes) return set_error(p->error_handle, 203);