Skip to content

Commit

Permalink
Sanitize CD Disk dupe information (wiremod#2978)
Browse files Browse the repository at this point in the history
* Sanitize CD Disk dupe information

* Update gmod_wire_cd_disk.lua

* Update gmod_wire_cd_disk.lua
  • Loading branch information
DerelictDrone authored Jan 10, 2024
1 parent 730d702 commit 842f5a1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua/entities/gmod_wire_cd_disk.lua
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function ENT:BuildDupeInfo()
info["DiskMemory"][k] = dataptr
info["DiskData"..dataptr] = {}
for k2,v2 in pairs(self.DiskMemory[k]) do
info["DiskData"..dataptr][k2] = v2
info["DiskData"..dataptr][k2] = isnumber(v2) and v2 or 0
end
dataptr = dataptr + 1
end
Expand All @@ -54,7 +54,7 @@ function ENT:ApplyDupeInfo(ply, ent, info, GetEntByID)
local dataptr = info["DiskMemory"][k]
self.DiskMemory[k] = {}
for k2,v2 in pairs(info["DiskData"..dataptr]) do
self.DiskMemory[k][k2] = v2
self.DiskMemory[k][k2] = isnumber(v2) and v2 or 0
end
end

Expand Down

0 comments on commit 842f5a1

Please sign in to comment.