bug_6390 fixed 62/16062/3
Cedric Delamarre [Fri, 27 Feb 2015 15:43:28 +0000 (16:43 +0100)]
Change-Id: Icf3dd516b2a4748e08c705994b3f192831e36f87

scilab/modules/differential_equations/src/cpp/differentialequationfunctions.cpp

index dfdb7c5..61072e0 100644 (file)
@@ -708,7 +708,15 @@ void DifferentialEquationFunctions::execOdeF(int* n, double* t, double* y, doubl
             sprintf(errorMsg, _("Undefined fonction '%ls'.\n"), m_pStringFFunctionDyn->get(0));
             throw ast::ScilabError(errorMsg);
         }
-        ((ode_f_t)(func->functionPtr))(n, t, y, yout);
+
+        if (m_wstrCaller == L"ode")
+        {
+            ((ode_f_t)(func->functionPtr))(n, t, y, yout);
+        }
+        else
+        {
+            ((odedc_f_t)(func->functionPtr))(&m_odedcFlag, n, &m_odedcYDSize, t, y, yout);
+        }
     }
     else if (m_pStringFFunctionStatic) // function static
     {