From 4e2e6c952adb83b147664577ca87047e4b4b98eb Mon Sep 17 00:00:00 2001 From: mariosmsk Date: Wed, 24 Jul 2019 16:13:37 +0300 Subject: [PATCH] Fix EN_getElseaction and EN_setelseaction Co-Authored-By: Andreas Ashikkis --- src/epanet.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/epanet.c b/src/epanet.c index eb6b5cf..78e631f 100644 --- a/src/epanet.c +++ b/src/epanet.c @@ -5373,7 +5373,7 @@ int DLLEXPORT EN_getelseaction(EN_Project p, int ruleIndex, int actionIndex, if (ruleIndex < 1 || ruleIndex > p->network.Nrules) return 257; - actions = p->network.Rule[ruleIndex].ThenActions; + actions = p->network.Rule[ruleIndex].ElseActions; action = getaction(actions, actionIndex); if (action == NULL) return 258; @@ -5401,7 +5401,7 @@ int DLLEXPORT EN_setelseaction(EN_Project p, int ruleIndex, int actionIndex, if (ruleIndex < 1 || ruleIndex > p->network.Nrules) return 257; - actions = p->network.Rule[ruleIndex].ThenActions; + actions = p->network.Rule[ruleIndex].ElseActions; action = getaction(actions, actionIndex); if (action == NULL) return 258;