dxx-rebirth/similar
Kp 93d3793b30 Fix crash entering secret level with music on, and no songs
If music is configured as built-in, and no secret songs are configured,
then BIMSecretSongs is set to a non-null pointer to a zero-element
array.  This triggers a divide-by-zero when the array length is used in
a modulus operation.

Fix this by adding a special case that initializing from an empty vector
calls `reset()`, which causes the underlying unique_ptr to store
`nullptr` instead of `new bim_song_info[0]`.

Reported-by: Daniel-Leontiev <https://github.com/dxx-rebirth/dxx-rebirth/issues/465>
Fixes: c355e207fe ("Refactor song loading")
2019-11-02 04:36:15 +00:00
..
2d Downgrade PCX failures from Error to CON_URGENT 2019-07-07 22:00:02 +00:00
3d Use xrange for loops with zero start and simple identifier end 2019-05-04 18:27:37 +00:00
arch add hack for MCI or CD driver bug (?) 2019-10-27 02:48:20 +03:00
editor Use enumerate() to iterate some MAX_SIDES_PER_SEGMENT loops 2019-05-04 18:27:37 +00:00
main Fix crash entering secret level with music on, and no songs 2019-11-02 04:36:15 +00:00
misc Fix various gcc-9 -Wformat-truncation warnings 2019-05-06 00:36:16 +00:00