summaryrefslogtreecommitdiffstats
path: root/mpcommon.h
diff options
context:
space:
mode:
Diffstat (limited to 'mpcommon.h')
-rw-r--r--mpcommon.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/mpcommon.h b/mpcommon.h
index 472a2e1943..674d9b1554 100644
--- a/mpcommon.h
+++ b/mpcommon.h
@@ -41,7 +41,7 @@
do { \
size_t nextidx_ = (nextidx); \
size_t nelems_ = MP_TALLOC_ELEMS(p); \
- if (nextidx_ <= nelems_) \
+ if (nextidx_ >= nelems_) \
p = talloc_realloc_size((ctx), p, \
(nextidx_ + 1) * sizeof((p)[0]) * 2);\
} while (0)