The board is declared as 9x9, so the board indices go from 0…8, or 1…8 since you ignore the 0 elements.
But, the test for a valid move checks the new index < 10. So a value of 9 would pass the check, but is invalid.
(btw, that’d be a lot less tedious to code and read if you put the valid knight moves into a couple of arrays, then used a loop to iterate through them.)