From f456d207db0e01529efb00f025b69b20d7944d9f Mon Sep 17 00:00:00 2001 From: Alissa Date: Tue, 23 Sep 2025 13:13:59 +0200 Subject: [PATCH] Fixes Bug in setlinkvalue status value is only converted to StatusType enum for initial status --- src/epanet.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/epanet.c b/src/epanet.c index e8a31b4..5d9b543 100644 --- a/src/epanet.c +++ b/src/epanet.c @@ -4132,10 +4132,9 @@ int DLLEXPORT EN_setlinkvalue(EN_Project p, int index, int property, double valu if (Link[index].Type == CVPIPE) return 207; s = (char)ROUND(value); if (s < 0 || s > 2) return 211; - s = s + CLOSED; if (property == EN_INITSTATUS) { - Link[index].InitStatus = s; + Link[index].InitStatus = s + CLOSED; } else {