From 5edfe76e94d71fa7b0024c8ddf74fddf5d26160d Mon Sep 17 00:00:00 2001 From: Holger Schemel Date: Wed, 6 Mar 2024 09:10:26 +0100 Subject: [PATCH] fixed potential crash bug in BD engine --- src/game_bd/bd_graphics.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game_bd/bd_graphics.c b/src/game_bd/bd_graphics.c index fdf237f0..d355212e 100644 --- a/src/game_bd/bd_graphics.c +++ b/src/game_bd/bd_graphics.c @@ -398,7 +398,7 @@ static void gd_drawcave_tile(Bitmap *dest, GdGame *game, int x, int y, boolean d int dy = (dir == GD_MV_UP ? +1 : dir == GD_MV_DOWN ? -1 : 0); int old_x = cave->getx(cave, x + dx, y + dy); int old_y = cave->gety(cave, x + dx, y + dy); - int tile_from = game->element_buffer[old_y][old_x]; + int tile_from = game->element_buffer[old_y][old_x] & ~SKIPPED; // should never be skipped struct GraphicInfo_BD *g_from = &graphic_info_bd_object[tile_from][frame]; boolean old_is_player = is_player(tile_from); boolean old_is_moving = (game->dir_buffer[old_y][old_x] != GD_MV_STILL); -- 2.34.1