diff --git a/src/util.c b/src/util.c index 1b44127..17cd66d 100644 --- a/src/util.c +++ b/src/util.c @@ -121,5 +121,8 @@ void* vec_pop(struct Vector* vec) { } void* vec_get(struct Vector* vec, uint32_t index) { + if (index >= vec->length) + return NULL; + return vec->pages[index]; }