Squares outside of board were used in following scenarios:
- Passed pawn evaluation of unpromoted pawns on last rank (e.g., in sittuyin)
- SEE pruning of check evading drops in qsearch
// Passed pawns will be properly scored later in evaluation when we have
// full attack info.
- if (passed)
+ if (passed && is_ok(s + Up))
e->passedPawns[Us] |= s;
// Score this pawn
// Don't search moves with negative SEE values
if ( (!inCheck || evasionPrunable)
- && (!givesCheck || !(pos.blockers_for_king(~pos.side_to_move()) & from_sq(move)))
+ && (!givesCheck || !(is_ok(from_sq(move)) && pos.blockers_for_king(~pos.side_to_move()) & from_sq(move)))
&& !pos.see_ge(move))
continue;