mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 10:40:46 +00:00
- added missing validation to S_GetUserFlags functions.
This commit is contained in:
parent
b57d683938
commit
9ca2819ad1
2 changed files with 2 additions and 0 deletions
|
@ -114,6 +114,7 @@ float S_ConvertPitch(int lpitch)
|
||||||
|
|
||||||
int S_GetUserFlags(int num)
|
int S_GetUserFlags(int num)
|
||||||
{
|
{
|
||||||
|
if (!soundEngine->isValidSoundId(num+1)) return 0;
|
||||||
auto const* snd = (sound_t*)soundEngine->GetUserData(num + 1);
|
auto const* snd = (sound_t*)soundEngine->GetUserData(num + 1);
|
||||||
if (!snd) return 0;
|
if (!snd) return 0;
|
||||||
return snd->flags;
|
return snd->flags;
|
||||||
|
|
|
@ -113,6 +113,7 @@ float S_ConvertPitch(int lpitch)
|
||||||
|
|
||||||
int S_GetUserFlags(int num)
|
int S_GetUserFlags(int num)
|
||||||
{
|
{
|
||||||
|
if (!soundEngine->isValidSoundId(num+1)) return 0;
|
||||||
auto const* snd = (sound_t*)soundEngine->GetUserData(num + 1);
|
auto const* snd = (sound_t*)soundEngine->GetUserData(num + 1);
|
||||||
if (!snd) return 0;
|
if (!snd) return 0;
|
||||||
return snd->flags;
|
return snd->flags;
|
||||||
|
|
Loading…
Reference in a new issue