diff options
Diffstat (limited to 'src/nvim/tempfile.c')
-rw-r--r-- | src/nvim/tempfile.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/nvim/tempfile.c b/src/nvim/tempfile.c index 41fc163936..c25da77717 100644 --- a/src/nvim/tempfile.c +++ b/src/nvim/tempfile.c @@ -60,7 +60,11 @@ void vim_deltempdir(void) char_u **files; int file_count; - if (gen_expand_wildcards(1, &NameBuff, &file_count, &files, + + // Note: We cannot just do `&NameBuff` because it is a statically + // sized array so `NameBuff == &NameBuff` according to C semantics. + char_u *buff_list[1] = {(char_u*) NameBuff}; + if (gen_expand_wildcards(1, buff_list, &file_count, &files, EW_DIR|EW_FILE|EW_SILENT) == OK) { for (int i = 0; i < file_count; ++i) { os_remove((char *)files[i]); |