added minimum boxamount, check for crappy file
[mc1516pa.git] / modelchecker / main.c
index 751a272..06729b1 100644 (file)
@@ -28,7 +28,7 @@ void usage(char *prg)
                "\n"
                "Positional arguments:\n"
                "\tFILE  zero or one sokoban screens\n"
-               "\t              when no file is specified stdin will be used\n", prg);
+               "\t      when no file is specified stdin will be used\n", prg);
 }
 
 BDD subsolve(trans_t *t, BDD new){
@@ -171,6 +171,10 @@ int main(int argc, char **argv)
        } else {
                DPRINT("Processing: %s\n", argv[optind]);
                FILE *currentfile = fopen(argv[optind], "r");
+               if(currentfile == NULL){
+                       printf("File could not be opened\n");
+                       return 2;
+               }
                DPRINT("Opening file\n");
                return solve(currentfile, lurd);
                DPRINT("Closing file\n");