Avoid undefined memory read access.

This commit is contained in:
Oliver Schmidt 2024-01-10 01:51:03 +01:00 committed by GitHub
parent 15e8557f64
commit 8c881e847e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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,