From a7c58decfbf57fc5e502a1cbf8f40dd78c7465e5 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 25 Dec 2018 18:49:12 -0800 Subject: Add a couple more ASSUMEs for number of channels and sends --- Alc/alu.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Alc/alu.cpp') 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 { -- cgit v1.2.3