diff --git a/main.c b/main.c index 7a2450a..7955f76 100644 --- a/main.c +++ b/main.c @@ -72,6 +72,11 @@ int main(int argc, char* argd[] ){ /// READ INPUT FILE /// FILE* rom=fopen(infile,"r"); + if(!rom){ + printf("Couldn't open input file %s\n",infile); + return 1; + } + struct simdata_t *simdata = init_simdata(); if(!simdata){ printf("Couldn't allocate memory\n");