From ada173716dc3646f04b78092e05ab6865bf21812 Mon Sep 17 00:00:00 2001 From: Ian Bell <ian.bell@nist.gov> Date: Mon, 18 Oct 2021 18:34:58 -0400 Subject: [PATCH] Evidently not returning a value from a function that should causes some weird behaviors with (ierr != 0) not working properly --- src/sat_Z_accuracy.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sat_Z_accuracy.cpp b/src/sat_Z_accuracy.cpp index ea28e85..8af7c56 100644 --- a/src/sat_Z_accuracy.cpp +++ b/src/sat_Z_accuracy.cpp @@ -58,9 +58,10 @@ int REFPROP_setup() { char hpath[256]; strcpy(hpath, (path + std::string(254-path.size(),'\0')).c_str()); SETPATHdll(hpath, 255); int ierr = 0, nc = 1; - char herr[256], hfld[10000] = "PROPANE ", hhmx[255] = "HMX.BNC", href[4] = "DEF"; + char herr[256], hfld[10000] = "PROPANE ", hhmx[256] = "HMX.BNC", href[4] = "DEF"; SETUPdll(nc, hfld, hhmx, href, ierr, herr, 10000, 255, 3, 255); if (ierr != 0) { throw std::invalid_argument("Bad setup of REFPROP: "+std::string(herr)); } + return 0; } struct REFPROP_sat_output { -- GitLab