]> git.sesse.net Git - stockfish/blobdiff - src/square.h
Change move_is_ok() and square_is_ok() in something useful
[stockfish] / src / square.h
index f89c72eefe6b770075594b7092ca1b42d1ce9185..46456d0677c88fed74609a2a9654e68245ba830a 100644 (file)
@@ -177,7 +177,7 @@ inline bool rank_is_ok(Rank r) {
 }
 
 inline bool square_is_ok(Square s) {
-  return file_is_ok(square_file(s)) && rank_is_ok(square_rank(s));
+  return s >= SQ_A1 && s <= SQ_H8;
 }
 
 #endif // !defined(SQUARE_H_INCLUDED)