diff options
Diffstat (limited to 'Src/builtin.c')
-rw-r--r-- | Src/builtin.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Src/builtin.c b/Src/builtin.c index 27355feff..534f49b57 100644 --- a/Src/builtin.c +++ b/Src/builtin.c @@ -30,6 +30,8 @@ /* this is defined so we get the prototype for open_memstream */ #define _GNU_SOURCE 1 +#include <assert.h> + #include "zsh.mdh" #include "builtin.pro" @@ -3404,6 +3406,7 @@ bin_unset(char *name, char **argv, Options ops, int func) } else { /* start is after the element for reverse index */ int start = vbuf.start - !!(vbuf.flags & VALFLAG_INV); + assert(vbuf.pm->length == arrlen(vbuf.pm->u.arr)); if (start < vbuf.pm->length) { char *arr[2]; arr[0] = ""; |