From 674667c7ef1ff8a1d58c86365b780928cf1e7961 Mon Sep 17 00:00:00 2001 From: Torsten Sommer Date: Mon, 19 Aug 2024 16:02:15 +0200 Subject: [PATCH] Fix resourceURI for FMI 2.0 ME --- fmusim/FMI2MESimulation.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/fmusim/FMI2MESimulation.c b/fmusim/FMI2MESimulation.c index 1f7bf29d..fe7c3f26 100644 --- a/fmusim/FMI2MESimulation.c +++ b/fmusim/FMI2MESimulation.c @@ -14,10 +14,6 @@ FMIStatus FMI2MESimulate(const FMISimulationSettings* s) { FMIStatus status = FMIOK; - FMIInstance* S = s->S; - - const bool needsCompletedIntegratorStep = s->modelDescription->modelExchange->needsCompletedIntegratorStep; - char resourceURI[FMI_PATH_MAX] = ""; #ifdef _WIN32 @@ -26,6 +22,12 @@ FMIStatus FMI2MESimulate(const FMISimulationSettings* s) { snprintf(resourceURI, FMI_PATH_MAX, "%s/resources/", s->unzipdir); #endif + CALL(FMIPathToURI(resourceURI, resourceURI, FMI_PATH_MAX)); + + FMIInstance* S = s->S; + + const bool needsCompletedIntegratorStep = s->modelDescription->modelExchange->needsCompletedIntegratorStep; + fmi2Real time; bool stateEvent = false;