diff --git a/qucs/components/sparamfile.cpp b/qucs/components/sparamfile.cpp index 345c14d6..a3dd96ea 100644 --- a/qucs/components/sparamfile.cpp +++ b/qucs/components/sparamfile.cpp @@ -207,7 +207,7 @@ QString SParamFile::spice_netlist(bool isXyce) QString s_mod = "YLIN_" + Name + "_model"; for(int i = 0; i < Np; i++) { QString p_in = spicecompat::normalize_node_name(Ports.at(i)->Connection->Name); - QString p_com = spicecompat::normalize_node_name(Ports.at(Np-1)->Connection->Name); + QString p_com = spicecompat::normalize_node_name(Ports.at(Np)->Connection->Name); s += QString(" %1 %2").arg(p_in).arg(p_com); } s += QString(" %1\n").arg(s_mod);