Vector: Fix operator[]

Istg Vector has a curse or something, the annoying and inexplicable bugs always end up in Vector.
This commit is contained in:
apio 2023-03-29 01:05:30 +02:00
parent 0847cfcb65
commit 0320ffb485
Signed by: apio
GPG Key ID: B8A7D06E42258954

View File

@ -106,13 +106,13 @@ template <typename T> class Vector
const T& operator[](usize index) const
{
check(index < m_size);
return m_data[m_size];
return m_data[index];
}
T& operator[](usize index)
{
check(index < m_size);
return m_data[m_size];
return m_data[index];
}
Iterator begin()