This solves the garbled error message and optionally adds an improved specific error message, which existed in EPANET 2.1 when a network has unconnected nodes. Another similar case in was code found and corrected with the same pattern, but could not be tested.
This commit is contained in:
@@ -816,13 +816,14 @@ int unlinked(Project *pr)
|
||||
{
|
||||
Network *net = &pr->network;
|
||||
int i, count = 0;
|
||||
char errmsg[MAXMSG + 1] = "";
|
||||
|
||||
for (i = 1; i <= net->Njuncs; i++)
|
||||
{
|
||||
if (pr->network.Adjlist[i] == NULL)
|
||||
{
|
||||
count++;
|
||||
sprintf(pr->Msg, "Error 233: %s %s", geterrmsg(233, pr->Msg), net->Node[i].ID);
|
||||
sprintf(pr->Msg, "Error 2331: %s %s", geterrmsg(2331, errmsg), net->Node[i].ID);
|
||||
writeline(pr, pr->Msg);
|
||||
}
|
||||
if (count >= 10) break;
|
||||
|
||||
Reference in New Issue
Block a user