jarikomppa / soloud

Free, easy, portable audio engine for games
http://soloud-audio.com
Other
1.69k stars 270 forks source link

Incorrect allocation of mVoiceGroup storage #321

Closed TechPizzaDev closed 1 year ago

TechPizzaDev commented 2 years ago

So I was digging through SoLoud source for a port of mine, and this seems to be allocating an incorrect amount: https://github.com/jarikomppa/soloud/blob/20d7b76c3dd3bb5e6f66a6af1796d1e3f6476ac8/src/core/soloud_core_voicegroup.cpp#L42

The first element should correspond to allocation length, as mentioned here: https://github.com/jarikomppa/soloud/blob/20d7b76c3dd3bb5e6f66a6af1796d1e3f6476ac8/include/soloud.h#L574-L575

This claim is reinforced with this line sligtly below: https://github.com/jarikomppa/soloud/blob/20d7b76c3dd3bb5e6f66a6af1796d1e3f6476ac8/src/core/soloud_core_voicegroup.cpp#L85

This has a very high chance of fixing https://github.com/jarikomppa/soloud/issues/279 Here is the single-character PR for it: https://github.com/jarikomppa/soloud/pull/322

jarikomppa commented 2 years ago

Thanks for investigating this. Fix is now merged.