From af67662a3fd7d7cdd67b23463fc5632b0222d858 Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Fri, 20 Mar 2026 16:01:19 +0100 Subject: [PATCH] In case of transient simulation error, bail out when fft is called. --- src/frontend/com_fft.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/frontend/com_fft.c b/src/frontend/com_fft.c index 8b74414fc..062f40977 100644 --- a/src/frontend/com_fft.c +++ b/src/frontend/com_fft.c @@ -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];