aboutsummaryrefslogtreecommitdiff
path: root/src/moves.cpp
diff options
context:
space:
mode:
authorAdam <adammegarules1@gmail.com>2026-07-31 20:11:01 +0200
committerAdam <adammegarules1@gmail.com>2026-07-31 20:11:01 +0200
commitee7815bad917cf880c147186a01679fb7ce46a8e (patch)
treeb645ea43ae002c1cc6cca37106b665390358f1b5 /src/moves.cpp
parent061f2af803f7abfb4f655ef67769e79db705a3e1 (diff)
making stricter cmake list and then fixing bug it found
Diffstat (limited to 'src/moves.cpp')
-rw-r--r--src/moves.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/moves.cpp b/src/moves.cpp
index 84c5ba4..b07c91b 100644
--- a/src/moves.cpp
+++ b/src/moves.cpp
@@ -354,8 +354,8 @@ bool IsSquareAttacked(Game *g, Position square, bool white) {
}
Position IndexToPosition(int i) {
- uint8_t rank = i / 8; // 0-7
- uint8_t file = i % 8; // 0-7
+ uint8_t rank = static_cast<uint8_t>(i / 8); // 0-7
+ uint8_t file = static_cast<uint8_t>(i % 8); // 0-7
return {rank, file};
}