From 8fced10a19aca8223d6bf1dae0ae7e39de3cc41d Mon Sep 17 00:00:00 2001 From: Garrett Brown Date: Sat, 16 May 2020 22:57:39 -0400 Subject: [PATCH] Normalize nulls in path --- lua/wire/wireshared.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/wire/wireshared.lua b/lua/wire/wireshared.lua index fdbff5e0e0..445a5d315a 100644 --- a/lua/wire/wireshared.lua +++ b/lua/wire/wireshared.lua @@ -54,6 +54,9 @@ end function string.GetNormalizedFilepath( path ) -- luacheck: ignore + local null = string.find(path, "\x00", 1, true) + if null then path = string.sub(path, 1, null-1) end + local tbl = string.Explode( "[/\\]+", path, true ) local i = 1 while i <= #tbl do