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