device.c, bug #342, prevent crash when using 'alter'

#342 SegFault alter command
https://sourceforge.net/p/ngspice/bugs/342/
This commit is contained in:
h_vogt 2017-04-11 19:18:15 +02:00 committed by rlar
parent 9ddd1d7d40
commit d06f39f67d
1 changed files with 1 additions and 0 deletions

View File

@ -1164,6 +1164,7 @@ com_alter_common(wordlist *wl, int do_model)
wl = wl->wl_next;
step = -1;
wl2 = wlin;
wl = NULL;
} else if (strlen(argument) > 1) {
wl2 = wl_cons(copy_substring(argument, eqptr),
wl_cons(copy("="),