Mapimg crash with high number of players
img_save_magickwand() crashed to division by zero.
First, in line 2152 (in master) assigns zero to plrwidth (map_width = 387, player_slot_count() = 512, integer math):
plrwidth = map_width / player_slot_count();
Then, at line 2165 there's division by plrwidth:
i = (x - plroffset) / plrwidth;
#6 Updated by Marko Lindqvist 3 months ago
- Status changed from In Progress to Resolved
- Assignee deleted (
- Target version changed from 3.1.0 to 2.6.1
While the problem is more likely to occur in master where max number of players (barbarians included) is 512, it can happen in older branches with smaller displays -> retargeting to S2_6.