Browse Source

Prevent crash if *line == NULL

pre-master-46
Holger Vogt 3 years ago
parent
commit
a28784d6d7
  1. 5
      src/spicelib/parser/inpgtok.c

5
src/spicelib/parser/inpgtok.c

@ -31,6 +31,11 @@ INPgetTok(char **line, char **token, int gobble)
char *point;
int signstate;
if (!*line) {
*token = NULL;
return (E_PARMVAL);
}
/* scan along throwing away garbage characters until end of line
or a separation char is found */
for (point = *line; *point != '\0'; point++) {

Loading…
Cancel
Save