From 324602226c370610415d5a8f129137c6fe74ab1d Mon Sep 17 00:00:00 2001 From: Aaron Dotter Date: Thu, 12 Jun 2025 16:46:33 -0400 Subject: [PATCH] Update helm.cpp fix bug allowing integer iat to be used before being set. two lines of code were swapped to fix the problem. --- src/eos/private/helm.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/eos/private/helm.cpp b/src/eos/private/helm.cpp index efed85f..99c8cdb 100644 --- a/src/eos/private/helm.cpp +++ b/src/eos/private/helm.cpp @@ -355,8 +355,8 @@ namespace serif::eos::helmholtz { // hash the table location in t, rho: jat = (log10(T) - tlo)*tstpi; jat = max(0, min(jat, table.jmax-1)); // bounds - iat = max(0, min(iat, table.imax-1)); // bounds iat = (log10(din)-dlo)*dstpi; + iat = max(0, min(iat, table.imax-1)); // bounds //using the indices, access the table: fi[0] = table.f[iat][jat];