mirror of
https://github.com/neovim/neovim.git
synced 2025-09-07 11:58:17 +00:00
fix: fix incorrect call sites of xcalloc
The number of elements comes first and the size of each element second.
This commit is contained in:
@@ -1696,7 +1696,7 @@ void nvim_put(ArrayOf(String) lines, String type, Boolean after,
|
||||
FUNC_API_SINCE(6)
|
||||
FUNC_API_CHECK_TEXTLOCK
|
||||
{
|
||||
yankreg_T *reg = xcalloc(sizeof(yankreg_T), 1);
|
||||
yankreg_T *reg = xcalloc(1, sizeof(yankreg_T));
|
||||
if (!prepare_yankreg_from_object(reg, type, lines.size)) {
|
||||
api_set_error(err, kErrorTypeValidation, "Invalid type: '%s'", type.data);
|
||||
goto cleanup;
|
||||
|
Reference in New Issue
Block a user