avoid `meas' syntax error causing segfault

Invalid meas crashes ngspice with SIGSEV - ID: 3554330
http://sourceforge.net/tracker/?func=detail&aid=3554330&group_id=38962&atid=423915
This commit is contained in:
rlar 2012-08-06 19:42:49 +02:00
parent 46980f2cc6
commit 1a2477bdcc
1 changed files with 6 additions and 0 deletions

View File

@ -118,6 +118,12 @@ com_meas(wordlist *wl)
/* get output var name */
wl_count = wl_count->wl_next;
if (!wl_count) {
fprintf(stdout,
" meas %s failed!\n"
" unspecified output var name\n\n", line_in);
return;
}
outvar = wl_count->wl_word;
fail = get_measure2(wl, &result, NULL, FALSE) ;