Skip to content

Commit

Permalink
Merge pull request #777 from OpenWaterAnalytics/dev-tank_validation_fix
Browse files Browse the repository at this point in the history
Update validate.c
  • Loading branch information
LRossman authored Mar 21, 2024
2 parents 6b72b0a + c24f334 commit 7d36048
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/validate.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
Authors: see AUTHORS
Copyright: see AUTHORS
License: see LICENSE
Last Updated: 01/25/2024
Last Updated: 03/18/2024
******************************************************************************
*/

Expand Down Expand Up @@ -59,12 +59,13 @@ int validatetanks(Project *pr)
{
curve = &net->Curve[i];
n = curve->Npts - 1;
if ((tank->Hmin - elev) * pr->Ucf[ELEV] < curve->X[0] ||
(tank->Hmax - elev) * pr->Ucf[ELEV]> curve->X[n])
if ((tank->Hmin - elev) * pr->Ucf[ELEV] < curve->X[0] - TINY ||
(tank->Hmax - elev) * pr->Ucf[ELEV] > curve->X[n] + TINY)
{
levelerr = 1;
}
}

// Report error in levels if found
if (levelerr)
{
Expand Down

0 comments on commit 7d36048

Please sign in to comment.