CMD_LINE: Fixed handling of missing input file
This commit is contained in:
parent
4402688a20
commit
1e04a7ab0d
5
main.c
5
main.c
@ -72,6 +72,11 @@ int main(int argc, char* argd[] ){
|
|||||||
/// READ INPUT FILE ///
|
/// READ INPUT FILE ///
|
||||||
FILE* rom=fopen(infile,"r");
|
FILE* rom=fopen(infile,"r");
|
||||||
|
|
||||||
|
if(!rom){
|
||||||
|
printf("Couldn't open input file %s\n",infile);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
struct simdata_t *simdata = init_simdata();
|
struct simdata_t *simdata = init_simdata();
|
||||||
if(!simdata){
|
if(!simdata){
|
||||||
printf("Couldn't allocate memory\n");
|
printf("Couldn't allocate memory\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user