From cdb4f872b24dd811c6053026695d342e05d2b1f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= Date: Thu, 10 Feb 2022 17:15:24 +0100 Subject: [PATCH] =?UTF-8?q?Bytecode:=20fix=20crash=20with=20stack=5Fsolve?= =?UTF-8?q?=5Falgo=3D1=20on=20=E2=80=9CSolve=20forward/backward=E2=80=9D?= =?UTF-8?q?=20blocks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mex/sources/bytecode/SparseMatrix.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mex/sources/bytecode/SparseMatrix.cc b/mex/sources/bytecode/SparseMatrix.cc index 5cdb11ef7..397c04f92 100644 --- a/mex/sources/bytecode/SparseMatrix.cc +++ b/mex/sources/bytecode/SparseMatrix.cc @@ -3867,7 +3867,7 @@ dynSparseMatrix::Simulate_One_Boundary(int block_num, int y_size, int y_kmin, in if (!x0_m) throw FatalExceptionHandling(" in Simulate_One_Boundary, can't allocate x0_m vector\n"); if (!((solve_algo == 6 && steady_state) - || ((stack_solve_algo == 0 || stack_solve_algo == 4) && !steady_state))) + || ((stack_solve_algo == 0 || stack_solve_algo == 1 || stack_solve_algo == 4) && !steady_state))) { Init_Matlab_Sparse_Simple(size, IM_i, A_m, b_m, zero_solution, x0_m); A_m_save = mxDuplicateArray(A_m);