diff options
author | Lewis Russell <lewis6991@gmail.com> | 2022-11-04 10:31:09 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-04 10:31:09 +0000 |
commit | f1c864cfe340dbb225caaf3dcbe28ee705be9f75 (patch) | |
tree | 15d3bcac280cbaaa6f5402c101680b2af5edc397 /src/nvim/lua/xdiff.c | |
parent | 24fa5f70edd4cc3b613237283ee7d63af1948c16 (diff) | |
download | rneovim-f1c864cfe340dbb225caaf3dcbe28ee705be9f75.tar.gz rneovim-f1c864cfe340dbb225caaf3dcbe28ee705be9f75.tar.bz2 rneovim-f1c864cfe340dbb225caaf3dcbe28ee705be9f75.zip |
fix(diff): remove size_t underflow (#20929)
Diffstat (limited to 'src/nvim/lua/xdiff.c')
-rw-r--r-- | src/nvim/lua/xdiff.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/lua/xdiff.c b/src/nvim/lua/xdiff.c index 428a33cdad..ec7dc3c666 100644 --- a/src/nvim/lua/xdiff.c +++ b/src/nvim/lua/xdiff.c @@ -60,8 +60,8 @@ static void get_linematch_results(lua_State *lstate, mmfile_t *ma, mmfile_t *mb, const char *diff_begin[2] = { ma->ptr, mb->ptr }; int diff_length[2] = { (int)count_a, (int)count_b }; - fastforward_buf_to_lnum(&diff_begin[0], (size_t)start_a); - fastforward_buf_to_lnum(&diff_begin[1], (size_t)start_b); + fastforward_buf_to_lnum(&diff_begin[0], start_a); + fastforward_buf_to_lnum(&diff_begin[1], start_b); int *decisions = NULL; size_t decisions_length = linematch_nbuffers(diff_begin, diff_length, 2, &decisions, iwhite); |