Merge pull request #12 from oliverschmidt/patch-1

Avoid undefined memory read access.
This commit is contained in:
Stefan Wessels 2024-01-10 20:17:30 +00:00 committed by GitHub
commit 52e003537e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -218,7 +218,11 @@ void plat_DrawSquare(char position)
inv = blackWhite ^ (piece & PIECE_WHITE) != 0;
}
else
{
rop = blackWhite ? ROP_WHITE : ROP_BLACK;
inv = 0;
piece = 1;
}
hires_Draw(2+x*BOARD_PIECE_WIDTH,14+y*BOARD_PIECE_HEIGHT,
BOARD_PIECE_WIDTH,BOARD_PIECE_HEIGHT,rop,