diff options
author | Chris Robinson <[email protected]> | 2018-01-11 09:53:52 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2018-01-11 09:53:52 -0800 |
commit | ca9e6a4f9434ca25f821802d1b6e1363b18d7b81 (patch) | |
tree | a0fc9dace8d98b8278260c7015391e0cdcf90273 /Alc/ringbuffer.c | |
parent | b11131ce0c76d2b46208ad5473dd86dc5343ce5f (diff) |
Ensure NextPowerOf2 is being used correctly
Diffstat (limited to 'Alc/ringbuffer.c')
-rw-r--r-- | Alc/ringbuffer.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Alc/ringbuffer.c b/Alc/ringbuffer.c index 63add593..e2ea2ab5 100644 --- a/Alc/ringbuffer.c +++ b/Alc/ringbuffer.c @@ -51,9 +51,8 @@ ll_ringbuffer_t *ll_ringbuffer_create(size_t sz, size_t elem_sz) ll_ringbuffer_t *rb; size_t power_of_two; - power_of_two = NextPowerOf2(sz); - if(power_of_two < sz) - return NULL; + power_of_two = NextPowerOf2((ALuint)sz); + if(power_of_two < sz) return NULL; rb = al_malloc(16, sizeof(*rb) + power_of_two*elem_sz); if(!rb) return NULL; |