diff options
author | bfredl <bjorn.linse@gmail.com> | 2023-01-30 14:46:28 +0100 |
---|---|---|
committer | bfredl <bjorn.linse@gmail.com> | 2023-01-31 18:28:29 +0100 |
commit | 42999a8d645ccf880222f0192671b8ce01bde361 (patch) | |
tree | c65aa7e49da559c4f0aa3685366ae69f140ea0cc /src/nvim/marktree.c | |
parent | d6d6ab3f8e77d54c8030c0c18f17d3c72ac4445c (diff) | |
download | rneovim-42999a8d645ccf880222f0192671b8ce01bde361.tar.gz rneovim-42999a8d645ccf880222f0192671b8ce01bde361.tar.bz2 rneovim-42999a8d645ccf880222f0192671b8ce01bde361.zip |
fix(test): fix issues detected by running unittests in ASAN/UBSAN
Diffstat (limited to 'src/nvim/marktree.c')
-rw-r--r-- | src/nvim/marktree.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/marktree.c b/src/nvim/marktree.c index 2036ddd21d..77ba6e6fa4 100644 --- a/src/nvim/marktree.c +++ b/src/nvim/marktree.c @@ -1182,7 +1182,7 @@ static size_t check_node(MarkTree *b, mtnode_t *x, mtpos_t *last, bool *last_rig assert(x->ptr[i] != x->ptr[j]); } } - } else { + } else if (x->n > 0) { *last = x->key[x->n - 1].pos; } return n_keys; |