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:
parent
0847cfcb65
commit
0320ffb485
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user