Illegal Castle??

Sort:
MasterOfWar75

I just had a game as White where my dark Knight had a clear line on the h2-b8 diagonal and opponent, Black, was able to castle Queen-side.  19...0-0-0

 

From what I understand, one cannot castle through attacked squares. Even stranger was that a game analysis suggested a better move for Black on a different move that was also 0-0-0, while my Knight had the same clear path to b8. 

 

Anyone able to explain this? Thanks

MasterOfWar75
[COMMENT DELETED]
MasterOfWar75
[COMMENT DELETED]