Skip to content

Commit

Permalink
Merge pull request #2053 from thegrb93/null-path-fix
Browse files Browse the repository at this point in the history
Normalize nulls in path
  • Loading branch information
Sparky authored May 17, 2020
2 parents aab601e + 8fced10 commit 372e750
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 372e750

Please sign in to comment.