diff options
author | Mikael Magnusson <mikachu@gmail.com> | 2015-12-13 17:35:12 +0100 |
---|---|---|
committer | Mikael Magnusson <mikachu@gmail.com> | 2016-05-08 21:57:06 +0200 |
commit | 546a6b42b3a2b1172fbd099a0fee2864af16461c (patch) | |
tree | 5d3c312593262f892fc2ef0bf387c8cf9456367d /Src/builtin.c | |
parent | 7db77ff1bb173a3db5501b195da9effc3b4fbe53 (diff) | |
download | zsh-546a6b42b3a2b1172fbd099a0fee2864af16461c.tar.gz zsh-546a6b42b3a2b1172fbd099a0fee2864af16461c.tar.xz zsh-546a6b42b3a2b1172fbd099a0fee2864af16461c.zip |
Assert on problems
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] = ""; |