From c726585ce1a5a8776e747fe20bead0acec88edf4 Mon Sep 17 00:00:00 2001 From: Ghjuvan Lacambre Date: Sun, 19 Feb 2023 13:25:29 +0100 Subject: [PATCH] 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 . --- src/nvim/runtime.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nvim/runtime.c b/src/nvim/runtime.c index 3487a8d7a2..a6ed95ec64 100644 --- 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)