Browse Source

Fix from Holger Vogt for two cinditions that caused segfault.

pre-master-46
pnenzi 19 years ago
parent
commit
d1828b6d0b
  1. 6
      ChangeLog
  2. 6
      src/frontend/com_chdir.c
  3. 6
      src/frontend/inp.c

6
ChangeLog

@ -1,3 +1,9 @@
2007-12-31 Holger Vogt
* src/frontend/com_chdir.c: fix for the crashing of ngspice under Windows when
started from windows explorer.
* src/frontend/inp.c: ngspice crashed when executing a file consisting of a simple
control section. Fixed.
2007-12-29 Dietmar Warning
* src/frontend/inpcom.c: 3/4 terminal recognition for bjt's
* src/misc/string.c, stringutil.h: token function for bjt instance

6
src/frontend/com_chdir.c

@ -49,9 +49,9 @@ com_chdir(wordlist *wl)
}
if (*s && chdir(s) == -1)
perror(s);
if (s != NULL)
if (chdir(s) == -1)
perror(s);
if (copied)
tfree(s);

6
src/frontend/inp.c

@ -534,8 +534,10 @@ inp_spsource(FILE *fp, bool comfile, char *filename)
} /* if (deck->li_next) */
/* look for and set temperature; also store param and .meas statements in circuit struct */
ft_curckt->ci_param = NULL;
ft_curckt->ci_meas = NULL;
if (ft_curckt) {
ft_curckt->ci_param = NULL;
ft_curckt->ci_meas = NULL;
}
for (dd = deck; dd; dd = dd->li_next) {
/* get temp after numparam run on deck */

Loading…
Cancel
Save