Browse Source

inpgmod.c, INPgetMod(), bug fix, missing 'model' assignment

'model' is a return value, and must always be assigned to.
NULL denotes the error case.
pre-master-46
rlar 9 years ago
parent
commit
5905ed26fa
  1. 5
      src/spicelib/parser/inpgmod.c

5
src/spicelib/parser/inpgmod.c

@ -292,7 +292,10 @@ char *INPgetMod(CKTcircuit *ckt, char *name, INPmodel ** model, INPtables * tab)
if (! modtmp->INPmodfast) { /* Check if model is already defined */
error = create_model( ckt, modtmp, tab );
if ( error ) return INPerror(error);
if ( error ) {
*model = NULL;
return INPerror(error);
}
}
*model = modtmp;
return (NULL);

Loading…
Cancel
Save