Rat in a maze - code correction - recursion

CODE: https://ide.codingblocks.com/s/42564

Kindly identify the error in code, since I’m getting an infinite loop somewhere

https://ide.codingblocks.com/s/42573
^I have commented the error, hope it helps

lol.
thanks for the help.
such a silly mistake.