From 99119ef9926a42d7a5e9e05ddbc0e5f9a6a2e193 Mon Sep 17 00:00:00 2001 From: Sam Hatchett Date: Mon, 22 Jul 2013 16:39:09 -0400 Subject: [PATCH] bug fixes from master --- src/epanet.c | 7 ++++--- src/output.c | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/epanet.c b/src/epanet.c index 4c12d43..72e352e 100755 --- a/src/epanet.c +++ b/src/epanet.c @@ -1779,8 +1779,8 @@ int DLLEXPORT ENgetcurve(int curveIndex, int *nValues, EN_API_FLOAT_TYPE **xVal EN_API_FLOAT_TYPE *pointX = calloc(nPoints, sizeof(EN_API_FLOAT_TYPE)); EN_API_FLOAT_TYPE *pointY = calloc(nPoints, sizeof(EN_API_FLOAT_TYPE)); - - for (int iPoint = 0; iPoint < nPoints; iPoint++) { + int iPoint; + for (iPoint = 0; iPoint < nPoints; iPoint++) { double x = curve.X[iPoint] * Ucf[LENGTH]; double y = curve.Y[iPoint] * Ucf[VOLUME]; pointX[iPoint] = (EN_API_FLOAT_TYPE)x; @@ -3297,7 +3297,8 @@ int DLLEXPORT ENgetaveragepatternvalue(int index, EN_API_FLOAT_TYPE *value) if (!Openflag) return(102); if (index < 1 || index > Npats) return(205); //if (period < 1 || period > Pattern[index].Length) return(251); - for (int i=0; i