diff --git a/sk1a/maze.c b/sk1a/maze.c index 8ea8763..8fa3a69 100644 --- a/sk1a/maze.c +++ b/sk1a/maze.c @@ -18,7 +18,7 @@ int solve_recursive(char* maze, int size, int x, int y, int down_visited, int ri return 1; } - if(x != size - 1 && maze[x + 1 + y * size] != 'x'){ + if(x != size - 1 && maze[x + 1 + y * size] != 'x' && right_visited != 1){ return solve_recursive(maze, size, x+1, y, 0, 0); }