fix non regression tests in differential_equations module.
[scilab.git] / scilab / modules / differential_equations / sci_gateway / cpp / sci_ode.cpp
index e91fbff..d7234c9 100644 (file)
@@ -1140,10 +1140,12 @@ types::Function::ReturnValue sci_ode(types::typed_list &in, int _iRetCount, type
 
                 if (bCatch)
                 {
-                    wchar_t szError[bsiz];
-                    os_swprintf(szError, bsiz, _W("%s: An error occured in '%s' subroutine.\n").c_str(), "ode", strMeth.c_str());
+                                       char sError[bsiz];
+                                       os_sprintf(sError, "%ls: An error occured in '%s' subroutine.\n", L"ode", strMeth.c_str());
+                                       wchar_t* szError = to_wide_string(sError);
                     os << szError;
                     throw ast::InternalError(os.str());
+                                       FREE(szError);
                 }
 
                 return types::Function::Error;
@@ -1360,10 +1362,12 @@ types::Function::ReturnValue sci_ode(types::typed_list &in, int _iRetCount, type
 
                 if (bCatch)
                 {
-                    wchar_t szError[bsiz];
-                    os_swprintf(szError, bsiz, _W("%s: An error occured in '%s' subroutine.\n").c_str(), "ode", strMeth.c_str());
+                                       char sError[bsiz];
+                                       os_sprintf(sError, "%ls: An error occured in '%s' subroutine.\n", L"ode", strMeth.c_str());
+                                       wchar_t* szError = to_wide_string(sError);
                     os << szError;
                     throw ast::InternalError(os.str());
+                                       FREE(szError);
                 }
 
                 return types::Function::Error;