Explorar o código

fix(vector): end() return wrong position

greatbridf %!s(int64=2) %!d(string=hai) anos
pai
achega
86643b9091
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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