aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/api/buffer.c
diff options
context:
space:
mode:
authorGregory Anders <greg@gpanders.com>2021-07-24 15:49:48 -0600
committerGregory Anders <greg@gpanders.com>2021-07-24 15:52:14 -0600
commit3fd4f2f611b60dabdac386f201efe92f52cbf18c (patch)
tree8831c7d9d1079be0874181c1f660c3a44830e9eb /src/nvim/api/buffer.c
parent46009499afbb0232124072d775caa9552d0f71de (diff)
downloadrneovim-3fd4f2f611b60dabdac386f201efe92f52cbf18c.tar.gz
rneovim-3fd4f2f611b60dabdac386f201efe92f52cbf18c.tar.bz2
rneovim-3fd4f2f611b60dabdac386f201efe92f52cbf18c.zip
fix: fix incorrect call sites of xcalloc
The number of elements comes first and the size of each element second.
Diffstat (limited to 'src/nvim/api/buffer.c')
-rw-r--r--src/nvim/api/buffer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/api/buffer.c b/src/nvim/api/buffer.c
index b371c08d2a..78e36e5ef0 100644
--- a/src/nvim/api/buffer.c
+++ b/src/nvim/api/buffer.c
@@ -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)) {