mirror of
https://github.com/vim/vim.git
synced 2025-10-10 06:24:10 -04:00
patch 8.2.2325: Vim9: crash if map() changes the item type
Problem: Vim9: crash if map() changes the item type. Solution: Check that the item type is still OK. (closes #7652) Fix problem with mapnew() on range list.
This commit is contained in:
@@ -1929,6 +1929,15 @@ internal_func_ret_type(int idx, int argcount, type_T **argtypes)
|
||||
return global_functions[idx].f_retfunc(argcount, argtypes);
|
||||
}
|
||||
|
||||
/*
|
||||
* Return TRUE if "idx" is for the map() function.
|
||||
*/
|
||||
int
|
||||
internal_func_is_map(int idx)
|
||||
{
|
||||
return global_functions[idx].f_func == f_map;
|
||||
}
|
||||
|
||||
/*
|
||||
* Check the argument count to use for internal function "idx".
|
||||
* Returns -1 for failure, 0 if no method base accepted, 1 if method base is
|
||||
|
Reference in New Issue
Block a user