Cycles: Add assert to an array at() function to be sure we don't have bad memory access
This commit is contained in:
parent
d9ef528d05
commit
b506f3d328
|
@ -19,7 +19,8 @@
|
|||
|
||||
/* Vector */
|
||||
|
||||
#include <string.h>
|
||||
#include <cassert>
|
||||
#include <cstring>
|
||||
#include <vector>
|
||||
|
||||
#include "util_aligned_malloc.h"
|
||||
|
@ -187,6 +188,7 @@ public:
|
|||
|
||||
T& operator[](size_t i) const
|
||||
{
|
||||
assert(i < datasize);
|
||||
return data[i];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue