I'm playing around Polyglot.
I have the code:
board_t board;
board_from_fen(&board, "4k3/4q3/8/8/8/8/8/4K3 w - - 1 2");
int myMove = move_make(square_make(4, 0), square_make(4, 1));
bool legal = move_is_legal(myMove, &board);
The position is: BQ: e7, BK: e8, WK: e1, white is under check and white to move. The line int myMove ... attempts to move the e1 king to e2 which is illegal. However, move_is_legal returns true....