Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion lua/advdupe2/sh_codec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,13 @@
local start = buff:Tell()
local slen = 0

while buff:ReadByte() ~= 0 do
while true do
local byte = buff:ReadByte()

if byte == 0 or not byte then
break
end

slen = slen + 1
end

Expand Down Expand Up @@ -532,7 +538,7 @@
if not readFile then print("File could not be read or found! ("..readFileName..")") return end
local readData = readFile:Read(readFile:Size())
readFile:Close()
local ok, tbl = AdvDupe2.Decode(readData)

Check warning on line 541 in lua/advdupe2/sh_codec.lua

View workflow job for this annotation

GitHub Actions / lint

"Unused variable"

Unused variable: ok
local writeFile = file.Open(writeFileName, "wb", "DATA")
if not writeFile then print("File could not be written! ("..writeFileName..")") return end
writeFile:Write(util.TableToJSON(tbl))
Expand Down
Loading