Skip to content

Commit

Permalink
Normalize nulls in path
Browse files Browse the repository at this point in the history
  • Loading branch information
thegrb93 committed May 17, 2020
1 parent 15e575a commit 8fced10
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lua/wire/wireshared.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8fced10

Please sign in to comment.