Skip to content
Snippets Groups Projects
Verified Commit 715ec9e4 authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Fix bytecode for block+mfs>0 in static model

Variable indices would be incorrect in the evaluated Jacobian if recursive
variables were present. This would lead to incorrect results and/or crashes in
bytecode MEX. This bug has been exposed by commit
f45a99fc, which actually enabled mfs>0 for
static models.
parent 7acf2783
Branches
No related tags found
No related merge requests found
......@@ -87,7 +87,8 @@ private:
int
getBlockJacobianEndoCol([[maybe_unused]] int blk, int var, [[maybe_unused]] int lag) const override
{
return var;
assert(var >= blocks[blk].getRecursiveSize());
return var - blocks[blk].getRecursiveSize();
}
// Write the block structure of the model in the driver file
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment