Hi Al.
in COMPONENT::set_port_by_name, there is a call to port_name(i) in
for (int i=0; i<max_nodes(); ++i) {
[..]
}
and then
std::string DEV_SUBCKT::port_name(int i)const {
if (_parent) {
return _parent->port_value(i);
}else{itested();
return "";
}
}
here, _parent is a MODEL_SUBCKT where port_value comes from COMPONENT, but...
const std::string COMPONENT::port_value(int i)const
{
assert(_n);
assert(i >= 0);
assert(i < net_nodes()); // <- boom
return _n[i].short_label();
}
now, this looks reasonable...
- change max_nodes() in DEV_SUBCKT to
{if(_parent){ return _parent->net_nodes();}else{return PORTS_PER_SUBCKT;}}
- change the asertion in COMPONENT::port_value(int) to
assert(i < max_nodes());
do you agree? anything else maybe?
thanks
felix
_______________________________________________
Gnucap-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/gnucap-devel