ses_path_t* child;
ScfEcomponent* c;
- ScfEcomponent* c1;
ScfEpin* p;
ScfEpin* p0;
ScfEpin* p1;
p0 = NULL;
p1 = NULL;
- int k0;
- int k1;
+ int k;
for (j = 0; j < path->pins->size; j++) {
p = path->pins->data[j];
if (p->lid == cp0->lid) {
p0 = p;
- k0 = j;
+ k = j;
break;
}
}
if (p->lid == cp1->lid) {
p1 = p;
- k1 = j;
break;
}
}
double _r = child->r / R;
double _jr = -child->jr / R;
- __ses_path_pr(f, path, k0, k1, &r, &jr);
+ __ses_path_pr(f, path, k, j, &r, &jr);
R = r * r + jr * jr;
r = r / R;
p1->pr -= dr;
p1->jpr -= jdr;
- if (SCF_EDA_Transistor == c->type && SCF_EDA_Transistor_E == p1->id) {
+ c = f->components[p1->lid];
+
+ if (SCF_EDA_Transistor == c->type && SCF_EDA_Transistor_E == p1->id && cp1 != p1) {
p = path->pins->data[j - 1];
p->pr -= dr;