Edge test case problem

if(currPosX>n-1|| currPosX<0 || currPosY>m-1 || currPosY<0){

            res.clear();

            res.push_back(-1);

}

This is the condition I am checking. but it is not solved

what if currPosX and currPosY are equal to 0 then?

Closing this topic as there is no response since last 12 hours. Please feel free to create a new topic and post this question as a reference link in the description of the new topic.