mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
patch 9.0.0440: crash when using mkdir() with "R" flag in compiled function
Problem: Crash when using mkdir() with "R" flag in compiled function. Solution: Reserve a variable for deferred function calls. Handle more than one argument.
This commit is contained in:
@@ -833,10 +833,11 @@ compile_call(
|
||||
}
|
||||
}
|
||||
|
||||
if (STRCMP(name, "writefile") == 0 && argcount > 2)
|
||||
if ((STRCMP(name, "writefile") == 0 && argcount > 2)
|
||||
|| (STRCMP(name, "mkdir") == 0 && argcount > 1))
|
||||
{
|
||||
// May have the "D" flag, reserve a variable for a deferred
|
||||
// function call.
|
||||
// May have the "D" or "R" flag, reserve a variable for a
|
||||
// deferred function call.
|
||||
if (get_defer_var_idx(cctx) == 0)
|
||||
idx = -1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user