Skip to content

Commit 372e750

Browse files
author
Sparky
authored
Merge pull request #2053 from thegrb93/null-path-fix
Normalize nulls in path
2 parents aab601e + 8fced10 commit 372e750

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lua/wire/wireshared.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ end
5454

5555

5656
function string.GetNormalizedFilepath( path ) -- luacheck: ignore
57+
local null = string.find(path, "\x00", 1, true)
58+
if null then path = string.sub(path, 1, null-1) end
59+
5760
local tbl = string.Explode( "[/\\]+", path, true )
5861
local i = 1
5962
while i <= #tbl do

0 commit comments

Comments
 (0)