From 0f296db4924a6f56d3707d21de5ddfe3952c1aa4 Mon Sep 17 00:00:00 2001 From: Elad Salomons Date: Tue, 4 Sep 2018 21:15:57 +0300 Subject: [PATCH] Initialize node and link comments in add functions --- src/epanet.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/epanet.c b/src/epanet.c index fba0a52..dd6c401 100644 --- a/src/epanet.c +++ b/src/epanet.c @@ -4893,6 +4893,7 @@ int DLLEXPORT EN_addnode(EN_ProjectHandle ph, char *id, EN_NodeType nodeType) { node->C0 = 0; node->Ke = 0; node->Rpt = 0; + strcpy(node->Comment, ""); coord->HaveCoords = FALSE; coord->X = 0; @@ -5003,6 +5004,7 @@ int DLLEXPORT EN_addlink(EN_ProjectHandle ph, char *id, EN_LinkType linkType, ch link->R = 0; link->Rc = 0; link->Rpt = 0; + strcpy(link->Comment, ""); ENHashTableInsert(net->LinkHashTable, link->ID, n); return set_error(p->error_handle, 0);