diff options
Diffstat (limited to 'src/nvim/regexp_bt.c')
-rw-r--r-- | src/nvim/regexp_bt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/regexp_bt.c b/src/nvim/regexp_bt.c index 1b32447d77..af3d93f7c4 100644 --- a/src/nvim/regexp_bt.c +++ b/src/nvim/regexp_bt.c @@ -2862,7 +2862,7 @@ static regprog_T *bt_regcomp(uint8_t *expr, int re_flags) } // Allocate space. - bt_regprog_T *r = xmalloc(sizeof(bt_regprog_T) + (size_t)regsize); + bt_regprog_T *r = xmalloc(offsetof(bt_regprog_T, program) + (size_t)regsize); r->re_in_use = false; // Second pass: emit code. |