Update epanet.c

This commit is contained in:
mariosmsk
2020-06-25 20:22:12 +03:00
parent 532f89d14b
commit e0745e9dc5

View File

@@ -3953,7 +3953,7 @@ int DLLEXPORT EN_setlinkvalue(EN_Project p, int index, int property, double valu
case EN_PUMP_POWER: case EN_PUMP_POWER:
if (Link[index].Type == PUMP) if (Link[index].Type == PUMP)
{ {
if (value < 0.0) return 211; if (value <= 0.0) return 211;
pumpIndex = findpump(&p->network, index); pumpIndex = findpump(&p->network, index);
net->Pump[pumpIndex].Ptype = CONST_HP; net->Pump[pumpIndex].Ptype = CONST_HP;
net->Pump[pumpIndex].Hcurve = 0; net->Pump[pumpIndex].Hcurve = 0;