Fix regression bug #579

Accept numbers to ac statement in voltage (current) sources
also given as parameters.
This commit is contained in:
Holger Vogt 2022-02-22 20:39:20 +01:00
parent 20d5919e59
commit f21255ef1b
1 changed files with 9 additions and 2 deletions

View File

@ -9567,8 +9567,15 @@ static void inp_check_syntax(struct card *deck)
/* get first token after ac */
char* numtok = gettok_node(&nnacline);
char* numtokfree = numtok;
/* check if token is a valid number */
INPevaluate(&numtok, &err, 0);
/* Check if token is a parameter, to be filled in later */
if (*numtok == '\'' || *numtok == '{') {
err = 0;
}
else {
/* check if token is a valid number */
INPevaluate(&numtok, &err, 0);
}
tfree(numtokfree);
}
/* if no number, replace 'ac' by 'ac 1 0' */