From 0320ffb485c9704e97c228c7582679181db6e355 Mon Sep 17 00:00:00 2001 From: apio Date: Wed, 29 Mar 2023 01:05:30 +0200 Subject: [PATCH] Vector: Fix operator[] Istg Vector has a curse or something, the annoying and inexplicable bugs always end up in Vector. --- libluna/include/luna/Vector.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libluna/include/luna/Vector.h b/libluna/include/luna/Vector.h index 4de73e11..51d1070d 100644 --- a/libluna/include/luna/Vector.h +++ b/libluna/include/luna/Vector.h @@ -106,13 +106,13 @@ template 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()