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

local_state_space_iteration_2 MEX: fix bug when there are more shocks that states

The code that computes ghx·yhat+ghu·u (both with and without pruning) was
making the implicit assumption that q⩽n, i.e. that the number of shocks is less
than or equal to the number of states. If q>n, it would try to read invalid
memory references in ghx and yhat, and would thus either crash or return dummy
results.

Closes: #1820
(cherry picked from commit ce282dc2)
parent 40c559ba
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment