fix
authorMart Lubbers <mart@martlubbers.net>
Wed, 20 Apr 2016 18:38:54 +0000 (20:38 +0200)
committerMart Lubbers <mart@martlubbers.net>
Wed, 20 Apr 2016 18:38:54 +0000 (20:38 +0200)
modelchecker/main.c

index 1f518eb..751a272 100644 (file)
@@ -48,7 +48,7 @@ int solve(FILE *inputstream, char *lurd)
 
        //Read screen
        time_start_read = clock();
-       sokoban_screen *screen = parse_screen(inputstream, false);
+       sokoban_screen *screen = parse_screen(inputstream, true);
        if (screen == NULL) {
                printf("Something went wrong encoding the screen\n");
                return 2;
@@ -83,8 +83,8 @@ int solve(FILE *inputstream, char *lurd)
        BDD old = sylvan_false;
        BDD new = init->bdd;
        //Do lurd
-       while(*lurd != '\0'){
-               switch(*lurd){
+       for(unsigned int i = 0; i<strlen(lurd); i++){
+               switch(lurd[i]){
                case 'l':
                        new = subsolve(rls->rell, new);
                        break;
@@ -98,10 +98,9 @@ int solve(FILE *inputstream, char *lurd)
                        new = subsolve(rls->reld, new);
                        break;
                default:
-                       printf("Unknown character in lucd: '%c'\n", *lurd);
+                       printf("Unknown character in lucd: '%c'\n", lurd[i]);
                        exit(2);
                }
-               lurd++;
        }
        int iteration = 0;
        bool found = false;