In case of transient simulation error, bail out when fft is called.

This commit is contained in:
Holger Vogt 2026-03-20 16:01:19 +01:00
parent 65e5ccb7bb
commit af67662a3f
1 changed files with 7 additions and 0 deletions

View File

@ -58,6 +58,13 @@ com_fft(wordlist *wl)
}
length = (plot_cur->pl_scale)->v_length;
/* in case of tran error */
if (length < 2) {
fprintf(cp_err, "Error: fft needs more than one time point, check the tran simulation!\n");
goto done;
}
time = (plot_cur->pl_scale)->v_realdata;
span = time[length-1] - time[0] + time[length-1] - time[length-2];