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 #450.
  • Loading branch information
lmoureaux committed Sep 12, 2021
1 parent 9c585c9 commit bc50af4
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 @@ -4725,7 +4725,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 bc50af4

Please sign in to comment.