summaryrefslogtreecommitdiff
path: root/lua/telescope/utils.lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua/telescope/utils.lua')
-rw-r--r--lua/telescope/utils.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/lua/telescope/utils.lua b/lua/telescope/utils.lua
index 2533c12..cd1c20c 100644
--- a/lua/telescope/utils.lua
+++ b/lua/telescope/utils.lua
@@ -96,7 +96,7 @@ utils.path_shorten = (function()
]]
return function(path)
- local c_str = ffi.new("char[?]", #path)
+ local c_str = ffi.new("char[?]", #path + 1)
ffi.copy(c_str, path)
return ffi.string(ffi.C.shorten_dir(c_str))
end