This patch fix a bug that make spice crash if the "where" command is issued when there are no unconvered nodes to report. While I never had such problem in ngspice,I have applied this, because this version of the function make the output of "where" better.
This commit is contained in:
parent
84c3d3fbc0
commit
7a57ec7b4a
|
|
@ -18,10 +18,28 @@ com_where(void)
|
||||||
{
|
{
|
||||||
char *msg;
|
char *msg;
|
||||||
|
|
||||||
|
/*CDHW typing where with no current circuit caused crashes CDHW*/
|
||||||
|
if (!ft_curckt) {
|
||||||
|
fprintf(cp_err, "There is no current circuit\n");
|
||||||
|
return; }
|
||||||
|
else if (ft_curckt->ci_ckt != "") {
|
||||||
|
fprintf(cp_err, "No unconverged node found.\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
msg = (*ft_sim->nonconvErr)((void *) (ft_curckt->ci_ckt), 0);
|
||||||
|
|
||||||
|
printf("%s", msg);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
if (ft_curckt) {
|
if (ft_curckt) {
|
||||||
msg = (*ft_sim->nonconvErr)((void *) (ft_curckt->ci_ckt), 0);
|
msg = (*ft_sim->nonconvErr)((void *) (ft_curckt->ci_ckt), 0);
|
||||||
fprintf(cp_out, "%s", msg);
|
fprintf(cp_out, "%s", msg);
|
||||||
} else {
|
} else {
|
||||||
fprintf(cp_err, "Error: no circuit loaded.\n");
|
fprintf(cp_err, "Error: no circuit loaded.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue