I believe the program has a flaw in allowing castling on queen side even if the line is covered by the opponent.
Castling through covered lines
Posted in
Chess
I've not seen a problem with implementation of this rule. When castling the rule is that the King must not move through check, ie if squares a1 and b1 are threatened White can still castle Queenside.