Bugfix for En_getaveragepatternvalue()

Fixes a bug where 0 was not considered to be a valid pattern index.
This commit is contained in:
james uber
2021-09-08 10:49:57 -04:00
parent 7baf992d69
commit 886a5cf266

View File

@@ -4525,7 +4525,7 @@ int DLLEXPORT EN_getaveragepatternvalue(EN_Project p, int index, double *value)
*value = 0.0;
if (!p->Openflag) return 102;
if (index < 1 || index > net->Npats) return 205;
if (index < 0 || index > net->Npats) return 205;
for (i = 0; i < Pattern[index].Length; i++)
{
*value += (double)Pattern[index].F[i];