diff options
Diffstat (limited to 'src/regexp.c')
-rw-r--r-- | src/regexp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/regexp.c b/src/regexp.c index c95795d0c..dd99607f4 100644 --- a/src/regexp.c +++ b/src/regexp.c @@ -1319,7 +1319,7 @@ bt_regcomp(char_u *expr, int re_flags) return NULL; /* Allocate space. */ - r = alloc(sizeof(bt_regprog_T) + regsize); + r = alloc(offsetof(bt_regprog_T, program) + regsize); if (r == NULL) return NULL; r->re_in_use = FALSE; |