Skip to content

Commit

Permalink
Fix a crash with sprite_type = "hex_cell"
Browse files Browse the repository at this point in the history
(cherry picked from commit ea2931c)
  • Loading branch information
lmoureaux committed Jan 14, 2023
1 parent e9a6f91 commit e82ff81
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion client/layer_terrain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -933,8 +933,9 @@ void layer_terrain::fill_terrain_sprite_array(
// Not matching against this terrain, pretend current terrain
// continues (it's always at match index 0)
indices[j] = 0;
} else {
indices[j] = std::distance(info.matches_with.begin(), it);
}
indices[j] = std::distance(info.matches_with.begin(), it);
}

// Pick the sprite
Expand Down

0 comments on commit e82ff81

Please sign in to comment.