mirror of
https://github.com/neovim/neovim.git
synced 2026-06-30 06:51:13 +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:
@@ -315,7 +315,7 @@ ArrayOf(String) nvim_buf_get_lines(uint64_t channel_id,
|
||||
}
|
||||
|
||||
rv.size = (size_t)(end - start);
|
||||
rv.items = xcalloc(sizeof(Object), rv.size);
|
||||
rv.items = xcalloc(rv.size, sizeof(Object));
|
||||
|
||||
if (!buf_collect_lines(buf, rv.size, start,
|
||||
(channel_id != VIML_INTERNAL_CALL), &rv, err)) {
|
||||
|
||||
Reference in New Issue
Block a user