summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/conts/vec.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/conts/vec.h b/include/conts/vec.h
index 224d7aa..6e50854 100644
--- a/include/conts/vec.h
+++ b/include/conts/vec.h
@@ -130,7 +130,7 @@ static inline VEC_TYPE *VEC(begin)(struct VEC_STRUCT *v)
static inline bool VEC(end)(struct VEC_STRUCT *v, VEC_TYPE *i)
{
- return &v->buf[v->n - 1] == i;
+ return &v->buf[v->n] == i;
}
static inline VEC_TYPE *VEC(next)(VEC_TYPE *i)