Преглед изворни кода

fix(vector): end() return wrong position

greatbridf пре 2 година
родитељ
комит
86643b9091
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      include/types/vector.hpp

+ 1 - 1
include/types/vector.hpp

@@ -208,7 +208,7 @@ public:
 
     iterator_type end() noexcept
     {
-        return iterator_type(m_arr + m_size - 1);
+        return iterator_type(m_arr + m_size);
     }
 
     bool empty(void) const noexcept