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:
Gregory Anders
2021-07-24 15:49:48 -06:00
parent 46009499af
commit 3fd4f2f611
4 changed files with 10 additions and 10 deletions

View File

@@ -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)) {