Skip to content

Commit

Permalink
projet: fix recursive input/output connections
Browse files Browse the repository at this point in the history
  • Loading branch information
quesnel committed Nov 12, 2024
1 parent ab80d45 commit d76b979
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/src/project.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -547,8 +547,8 @@ static void get_input_models(vector<project::cache::model_port>& inputs,
const grid_component& grid,
const port_id p) noexcept
{
for (const auto& con : grid.output_connections) {
if (con.y != p)
for (const auto& con : grid.input_connections) {
if (con.x != p)
continue;

const auto idx = grid.pos(con.row, con.col);
Expand Down Expand Up @@ -737,7 +737,7 @@ static status simulation_copy_connections(
get_output_models(sc.cache.outputs,
sc.mod,
*tree.children[src_idx].tn,
cnx.index_dst.compo);
cnx.index_src.compo);

if (tree.is_model(cnx.dst)) {
sc.cache.inputs.emplace_back(tree.children[dst_idx].mdl,
Expand Down

0 comments on commit d76b979

Please sign in to comment.