Corrected a potential crash condition while doing series combination.

This commit is contained in:
Tim Edwards 2021-01-08 09:55:00 -05:00
parent 920c6e6928
commit f3cebd9099
2 changed files with 3 additions and 3 deletions

View File

@ -1 +1 @@
1.5.161
1.5.162

View File

@ -3584,8 +3584,8 @@ int CombineSeries(char *model, int file)
/* Excise the 2nd instance. instlist[i][1] remains as the */
/* only pointer to it. */
for (obp = instlist[i][0]; obp->next->type > FIRSTPIN ||
obp->next->type == PROPERTY; obp = obp->next);
for (obp = instlist[i][0]; obp->next && (obp->next->type > FIRSTPIN ||
obp->next->type == PROPERTY); obp = obp->next);
for (ob2 = obp; ob2 && ob2->next != instlist[i][1]; ob2 = ob2->next);
/* Device may have been moved by the above code. If so, look for */