Fix a memory corruption issue

This commit is contained in:
Luke Benstead 2023-05-11 15:22:46 +01:00
parent c754c5c338
commit cba2fb7ceb

View File

@ -4,6 +4,7 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#include <stdint.h> #include <stdint.h>
#include <stdio.h>
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
@ -128,6 +129,7 @@ AV_FORCE_INLINE void* aligned_vector_resize(AlignedVector* vector, const unsigne
ret = aligned_vector_at(vector, previousCount); ret = aligned_vector_at(vector, previousCount);
} else { } else {
vector->size = element_count; vector->size = element_count;
ret = aligned_vector_at(vector, previousCount);
} }
return ret; return ret;