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
No related branches found
No related tags found
No related merge requests found
Pipeline #8171 passed
...@@ -87,7 +87,8 @@ private: ...@@ -87,7 +87,8 @@ private:
int int
getBlockJacobianEndoCol([[maybe_unused]] int blk, int var, [[maybe_unused]] int lag) const override 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 // 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