Rat in a maze (Recursion)

What’s the problem in this code

image
two mistake in base case

Modified Code