From c3b30f4611c8fb431840071375691e39095426e9 Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Fri, 5 Dec 2025 20:08:42 +0100 Subject: [PATCH] Improve thee error message --- src/spicelib/analysis/hbsetp.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/spicelib/analysis/hbsetp.c b/src/spicelib/analysis/hbsetp.c index f046011a5..830634dc6 100644 --- a/src/spicelib/analysis/hbsetp.c +++ b/src/spicelib/analysis/hbsetp.c @@ -24,8 +24,8 @@ HBsetParm(CKTcircuit *ckt, JOB *anal, int which, IFvalue *value) switch(which) { case HB_F1: - if (value->rValue < 0.0) { - errMsg = copy("Frequency 1 less than 0 is invalid for HB"); + if (value->rValue <= 0.0) { + errMsg = copy("A positive fundamental frequency is required for HB"); job->HBFreq1 = 1.0; return(E_PARMVAL); } @@ -36,7 +36,7 @@ HBsetParm(CKTcircuit *ckt, JOB *anal, int which, IFvalue *value) case HB_F2: if (value->rValue < 0.0) { - errMsg = copy("Frequency 2 less than 0 is invalid for HB"); + errMsg = copy("A negative second frequency is invalid for multitone HB"); job->HBFreq2 = 1.0; return(E_PARMVAL); } @@ -44,8 +44,6 @@ HBsetParm(CKTcircuit *ckt, JOB *anal, int which, IFvalue *value) job->HBFreq2 = value->rValue; break; - - default: return(E_BADPARM); }