inpcom.c, inp_add_series_resistor(), fill li_next slot yourself

This commit is contained in:
rlar 2017-04-22 10:29:57 +02:00
parent 84b66b6728
commit 0d17fffb00
1 changed files with 4 additions and 2 deletions

View File

@ -5550,8 +5550,10 @@ inp_add_series_resistor(struct line *deck)
// comment out current L line
// insert new new L and R lines immediately after current line
*(card->li_line) = '*';
d = xx_new_line(card->li_next, newR, 0, 0);
card->li_next = xx_new_line(d, newL, 0, 0);
d = xx_new_line(NULL, newR, 0, 0);
d->li_next = card->li_next;
card = card->li_next = xx_new_line(NULL, newL, 0, 0);
card->li_next = d;
card = d;
tfree(title_tok);