Mercurial > vim
comparison src/vim9execute.c @ 22292:3515f341e8ac v8.2.1695
patch 8.2.1695: Vim9: crash when using varargs type "any"
Commit: https://github.com/vim/vim/commit/2f8cbc4b225ba707c3926070a3f133eb0473aed2
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Sep 16 17:22:59 2020 +0200
patch 8.2.1695: Vim9: crash when using varargs type "any"
Problem: Vim9: crash when using varargs type "any".
Solution: Check if uf_va_type is &t_any. (closes https://github.com/vim/vim/issues/6957)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Wed, 16 Sep 2020 17:30:03 +0200 |
parents | 6b385c2b9ff5 |
children | 36e8e046c335 |
comparison
equal
deleted
inserted
replaced
22291:9a335daeb41d | 22292:3515f341e8ac |
---|---|
827 goto failed_early; | 827 goto failed_early; |
828 | 828 |
829 // Check the type of the list items. | 829 // Check the type of the list items. |
830 tv = STACK_TV_BOT(-1); | 830 tv = STACK_TV_BOT(-1); |
831 if (ufunc->uf_va_type != NULL | 831 if (ufunc->uf_va_type != NULL |
832 && ufunc->uf_va_type != &t_any | |
832 && ufunc->uf_va_type->tt_member != &t_any | 833 && ufunc->uf_va_type->tt_member != &t_any |
833 && tv->vval.v_list != NULL) | 834 && tv->vval.v_list != NULL) |
834 { | 835 { |
835 type_T *expected = ufunc->uf_va_type->tt_member; | 836 type_T *expected = ufunc->uf_va_type->tt_member; |
836 listitem_T *li = tv->vval.v_list->lv_first; | 837 listitem_T *li = tv->vval.v_list->lv_first; |