Browse Source

INPparseNumMod(), #1/14, return sooner

setting txtCard to 0 and cardType to E_MISSING (which is < 0)
caused the following `if (cardType >= 0)' to be skipped
  and then broke out of the enclosing 'while' loop
in this case, there where no other statements executed
pre-master-46
rlar 10 years ago
parent
commit
e824cbd193
  1. 4
      src/spicelib/parser/inpgmod.c

4
src/spicelib/parser/inpgmod.c

@ -397,8 +397,8 @@ INPparseNumMod( CKTcircuit* ckt, INPmodel *model, INPtables *tab, char **errMess
/* Do nothing */
} else if (cinprefix( cardName, "end", 3 ) ) {
/* Terminate parsing */
txtCard = ((card *) 0);
cardType = E_MISSING;
*errMessage = err;
return( 0 );
} else {
/* Error */
tmp = tprintf("Error on card %d : unrecognized name (%s) - ignored",

Loading…
Cancel
Save