Merge pull request #527 from Mariosmsk/fix_delete_link_comment

fix in EN_deleteLink
This commit is contained in:
Lew Rossman
2019-08-12 09:48:57 -04:00
committed by GitHub

View File

@@ -1892,11 +1892,6 @@ int DLLEXPORT EN_deletenode(EN_Project p, int index, int actionCode)
hashtable_update(net->NodeHashTable, net->Node[i].ID, i);
}
// Remove references to demands & source in last (inactive) Node array entry
net->Node[net->Nnodes].D = NULL;
net->Node[net->Nnodes].S = NULL;
net->Node[net->Nnodes].Comment = NULL;
// If deleted node is a tank, remove it from the Tank array
if (nodeType != EN_JUNCTION)
{
@@ -3261,7 +3256,6 @@ int DLLEXPORT EN_deletelink(EN_Project p, int index, int actionCode)
// Remove link's comment
free(net->Link[index].Comment);
net->Link[net->Nlinks].Comment = NULL;
// Shift position of higher entries in Link array down one
for (i = index; i <= net->Nlinks - 1; i++)