Don't send the empty line to create_circbyline(),

it is not used anymore and may cause a crash
This commit is contained in:
Holger Vogt 2020-07-21 10:42:08 +02:00
parent c8c58b9f5b
commit ce69e8d70c
1 changed files with 3 additions and 0 deletions

View File

@ -980,6 +980,9 @@ int ngSpice_Circ(char** circa){
while (circa[entries]) {
entries++;
}
entries--; /* don't send the empty line */
if (ft_ngdebug)
fprintf(stdout, "\nngspiceCirc: received netlist array with %d entries\n", entries);
/* create a local copy (to be freed in inpcom.c) */
for (i = 0; i < entries; i++) {
newline = copy(circa[i]);