Skip to content

Commit

Permalink
Bugfix: #351 Error opening PNG with O-O#
Browse files Browse the repository at this point in the history
  • Loading branch information
Isarhamster committed Aug 5, 2024
1 parent 00910e6 commit 66665a8
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/database/bitboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1874,7 +1874,7 @@ Move BitBoard::parseMove(const QString& algebraic) const
return createCastlingQ();
}
}
else if (strlen(san)==3)
else if (strlen(san)>=3)
{
if(strncmpi(san, "o-o", 3) == 0 || strncmp(san, "0-0", 3) == 0)
{
Expand All @@ -1884,8 +1884,16 @@ Move BitBoard::parseMove(const QString& algebraic) const
{
return createCastlingQ();
}
else if ((strncmp(san, "00", 2) == 0) || (strncmpi(san, "0K", 2) == 0))
{
return createCastlingK();
}
else if (strncmpi(san, "0Q", 2) == 0)
{
return createCastlingQ();
}
}
else if (strlen(san)==2)
else if (strlen(san)>=2)
{
if ((strncmp(san, "00", 2) == 0) || (strncmpi(san, "0K", 2) == 0))
{
Expand Down

0 comments on commit 66665a8

Please sign in to comment.