From d96eb1f63abb0601b46896c409876fb1ba9a8b6f Mon Sep 17 00:00:00 2001 From: Oleksandr Hryshchenko Date: Sun, 9 Jan 2022 17:23:58 +0000 Subject: [PATCH] =?UTF-8?q?=D0=98=D0=B7=D0=BC=D0=B5=D0=BD=D0=B8=D0=BB(?= =?UTF-8?q?=D0=B0)=20=D0=BD=D0=B0=20'sk1a/maze.c'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sk1a/maze.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); }