mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-10 14:52:01 +00:00
- fix crash issue with empty VOCs.
Pointer to empty data causes undefined behavior if length is 0.
This commit is contained in:
parent
dfb18ef9a9
commit
c69efe5817
1 changed files with 1 additions and 1 deletions
|
@ -450,7 +450,7 @@ SoundHandle SoundRenderer::LoadSoundVoc(uint8_t *sfxdata, int length)
|
|||
}
|
||||
|
||||
// Second pass to write the data
|
||||
if (okay)
|
||||
if (okay && len > 0)
|
||||
{
|
||||
data = new uint8_t[len];
|
||||
i = 26;
|
||||
|
|
Loading…
Reference in a new issue