diff options
author | Chris Robinson <chris.kcat@gmail.com> | 2018-12-25 18:49:12 -0800 |
---|---|---|
committer | Chris Robinson <chris.kcat@gmail.com> | 2018-12-25 18:49:12 -0800 |
commit | a7c58decfbf57fc5e502a1cbf8f40dd78c7465e5 (patch) | |
tree | 9fd66e75303c401acbe5230be0b0f9cf3c8e6fec | |
parent | 497226f11e811923936e6978a8f68055f5fe7467 (diff) |
Add a couple more ASSUMEs for number of channels and sends
-rw-r--r-- | Alc/alu.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Alc/alu.cpp b/Alc/alu.cpp index cad1a9e6..96d73d1a 100644 --- a/Alc/alu.cpp +++ b/Alc/alu.cpp @@ -578,6 +578,7 @@ void CalcPanningAndFilters(ALvoice *voice, const ALfloat Azi, const ALfloat Elev DirectChannels = false; break; } + ASSUME(num_channels > 0); std::for_each(std::begin(voice->Direct.Params), std::begin(voice->Direct.Params)+num_channels, [](DirectParams ¶ms) -> void @@ -587,6 +588,7 @@ void CalcPanningAndFilters(ALvoice *voice, const ALfloat Azi, const ALfloat Elev } ); const ALsizei NumSends{Device->NumAuxSends}; + ASSUME(NumSends >= 0); std::for_each(voice->Send+0, voice->Send+NumSends, [num_channels](ALvoice::SendData &send) -> void { |