diff --git a/lib/src/json.cpp b/lib/src/json.cpp index 70b5d138..3926d639 100644 --- a/lib/src/json.cpp +++ b/lib/src/json.cpp @@ -2634,7 +2634,7 @@ struct reader { if (auto* c_src = compo.children.try_to_get(src); c_src) if (auto* c_dst = compo.children.try_to_get(dst); c_dst) - if (not compo.connect(mod(), *c_src, p_src, *c_dst, p_dst)) + if (compo.connect(mod(), *c_src, p_src, *c_dst, p_dst)) return true; report_json_error(error_id::modeling_connect_error); diff --git a/lib/src/modeling-generic.cpp b/lib/src/modeling-generic.cpp index 722c49e9..377843b9 100644 --- a/lib/src/modeling-generic.cpp +++ b/lib/src/modeling-generic.cpp @@ -139,7 +139,7 @@ status generic_component::connect([[maybe_unused]] const modeling& mod, return new_error(modeling::part::connections); if (src.type == child_type::model) { - if (src.type == child_type::model) { + if (dst.type == child_type::model) { if (not is_ports_compatible( src.id.mdl_type, p_src.model, dst.id.mdl_type, p_dst.model)) return new_error(modeling::part::connections);