commit c726585ce1a5a8776e747fe20bead0acec88edf4
parent cbd4480f97a913e0e356ec02f652b693b0195767
Author: Ghjuvan Lacambre <code@lacamb.re>
Date: Sun, 19 Feb 2023 13:25:29 +0100
fix: windows assertion failure due to incorrect path length (#22324)
This commit fixes an assertion failure on windows debug builds that was
introduced in https://github.com/neovim/neovim/pull/22128 .
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/nvim/runtime.c b/src/nvim/runtime.c
@@ -1607,7 +1607,7 @@ char *runtimepath_default(bool clean_arg)
data_len = strlen(data_home);
size_t nvim_data_size = appname_len;
#if defined(MSWIN)
- nvim_data_size += sizeof("-data");
+ nvim_data_size += sizeof("-data") - 1; // -1: NULL byte should be ignored
#endif
if (data_len != 0) {
rtp_size += ((data_len + memcnt(data_home, ',', data_len)