Fix segmentation fault when the input file is missing
This commit is contained in:
parent
e9bc3488fb
commit
1babbc0c92
|
|
@ -2368,6 +2368,8 @@ void reset_lexor(FILE* out, char* paths[])
|
|||
isp->stringify_flag = 0;
|
||||
isp->comment = NULL;
|
||||
|
||||
yyout = out;
|
||||
|
||||
if (isp->file == 0) {
|
||||
perror(paths[0]);
|
||||
error_count += 1;
|
||||
|
|
@ -2382,8 +2384,6 @@ void reset_lexor(FILE* out, char* paths[])
|
|||
}
|
||||
}
|
||||
|
||||
yyout = out;
|
||||
|
||||
yyrestart(isp->file);
|
||||
|
||||
assert(istack == 0);
|
||||
|
|
|
|||
Loading…
Reference in New Issue