Skip to content

Commit

Permalink
Always initialize textras_near
Browse files Browse the repository at this point in the history
This prevents undefined behavior (in practice, artifacts with Trident).

See longturn#450.
  • Loading branch information
lmoureaux committed Sep 12, 2021
1 parent d840d74 commit 2c3e56b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/tilespec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4721,7 +4721,7 @@ fill_sprite_array(struct tileset *t, enum mapview_layer layer,
const struct unit_type *putype)
{
int tileno, dir;
bv_extras textras_near[8];
bv_extras textras_near[8]{};
bv_extras textras;
struct terrain *tterrain_near[8] = {nullptr};
struct terrain *pterrain = NULL;
Expand Down

0 comments on commit 2c3e56b

Please sign in to comment.