aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkcat <[email protected]>2019-09-14 18:29:48 -0700
committerGitHub <[email protected]>2019-09-14 18:29:48 -0700
commit6644a660e8df1dea96efa705aa01dd460a207dce (patch)
treea4446aabb29a7e63cfb820049a47b60952353efa
parent4e8caea97e7164b53fca31802cad7e1160930ae5 (diff)
parent0023614da545b2d1a7cecd730e80177e37e8ba9e (diff)
Merge pull request #342 from Lopuska/patch-1
pass proper effects slot number to AddActiveEffectSlots
-rw-r--r--al/auxeffectslot.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/al/auxeffectslot.cpp b/al/auxeffectslot.cpp
index b765887c..df35c533 100644
--- a/al/auxeffectslot.cpp
+++ b/al/auxeffectslot.cpp
@@ -280,7 +280,8 @@ START_API_FUNC
else
{
al::vector<ALuint> ids;
- ids.reserve(static_cast<ALuint>(n));
+ ALsizei count{n};
+ ids.reserve(static_cast<ALuint>(count));
do {
ALeffectslot *slot{AllocEffectSlot(context.get())};
if(!slot)
@@ -290,7 +291,7 @@ START_API_FUNC
return;
}
ids.emplace_back(slot->id);
- } while(--n);
+ } while(--count);
std::copy(ids.cbegin(), ids.cend(), effectslots);
}