no crash after 'unset undefined'

This commit is contained in:
h_vogt 2010-03-21 21:23:47 +00:00
parent df5931e570
commit 625b3d14fc
2 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2010-03-20 Holger Vogt
* variable.c:450 prevent ngspice from crashing after command 'unset zzz',
when zzz is not defined
2010-03-20 Holger Vogt
* com_compose.c: comment corrected
* subckt.c, cktdefs.h, acan.c, ifeval.c, inp2b.c, inpptree.c, cktinit.c:

View File

@ -447,7 +447,7 @@ cp_remvar(char *varname)
/* Gotta make up a var struct for cp_usrset()... */
v = alloc(struct variable);
ZERO(v, struct variable);
v->va_name = varname;
v->va_name = copy(varname);
v->va_type = VT_NUM;
v->va_bool = 0;
found = FALSE;