From: Holger Schemel Date: Sat, 24 Feb 2024 23:15:18 +0000 (+0100) Subject: fixed compiler warning X-Git-Tag: 4.4.0.0-test-1~288 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=27f82f7887886eee23bdf5da0f4e248b46d7f257;p=rocksndiamonds.git fixed compiler warning --- diff --git a/src/game_bd/bd_caveengine.c b/src/game_bd/bd_caveengine.c index aba15aff..4d528a41 100644 --- a/src/game_bd/bd_caveengine.c +++ b/src/game_bd/bd_caveengine.c @@ -2260,7 +2260,7 @@ void gd_cave_iterate(GdCave *cave, GdDirection player_move, boolean player_fire, { const GdDirection *creature_move; boolean ccw = rotates_ccw(cave, x, y); /* check if default is counterclockwise */ - GdElement base; /* base element number (which is like O_***_1) */ + GdElement base = -1; /* base element number (which is like O_***_1) */ int dir, dirn, dirp; /* direction */ if (get(cave, x, y) >= O_FIREFLY_1 && @@ -2279,7 +2279,7 @@ void gd_cave_iterate(GdCave *cave, GdDirection player_move, boolean player_fire, get(cave, x, y) <= O_ALT_BUTTER_4) base = O_ALT_BUTTER_1; - dir = get(cave, x, y)-base; /* facing where */ + dir = get(cave, x, y) - base; /* facing where */ creature_move = cave->creatures_backwards ? creature_chdir : creature_dir; /* now change direction if backwards */