diff options
author | Thomas Vigouroux <tomvig38@gmail.com> | 2021-07-26 20:30:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-26 20:30:10 +0200 |
commit | ec7881bbfd0b41812b39c658cb7c4be7993d113e (patch) | |
tree | 5dda2c4cdd848b191f6d57a5cd875680f4f7ce6d /src/nvim/undo.c | |
parent | 0e22a40b6d328ac4aa07ed7bc40da200a48ef524 (diff) | |
parent | 3fd4f2f611b60dabdac386f201efe92f52cbf18c (diff) | |
download | rneovim-ec7881bbfd0b41812b39c658cb7c4be7993d113e.tar.gz rneovim-ec7881bbfd0b41812b39c658cb7c4be7993d113e.tar.bz2 rneovim-ec7881bbfd0b41812b39c658cb7c4be7993d113e.zip |
Merge pull request #15180 from gpanders/xcalloc
fix: fix incorrect call sites of xcalloc
Diffstat (limited to 'src/nvim/undo.c')
-rw-r--r-- | src/nvim/undo.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/undo.c b/src/nvim/undo.c index 7afabc7913..3096fe84c0 100644 --- a/src/nvim/undo.c +++ b/src/nvim/undo.c @@ -1018,14 +1018,14 @@ static ExtmarkUndoObject *unserialize_extmark(bufinfo_T *bi, bool *error, extup->type = type; if (type == kExtmarkSplice) { n_elems = (size_t)sizeof(ExtmarkSplice) / sizeof(uint8_t); - buf = xcalloc(sizeof(uint8_t), n_elems); + buf = xcalloc(n_elems, sizeof(uint8_t)); if (!undo_read(bi, buf, n_elems)) { goto error; } extup->data.splice = *(ExtmarkSplice *)buf; } else if (type == kExtmarkMove) { n_elems = (size_t)sizeof(ExtmarkMove) / sizeof(uint8_t); - buf = xcalloc(sizeof(uint8_t), n_elems); + buf = xcalloc(n_elems, sizeof(uint8_t)); if (!undo_read(bi, buf, n_elems)) { goto error; } |