Skip to content

Commit

Permalink
exp: fix duplicate ids in progs functions tables
Browse files Browse the repository at this point in the history
with obfuscated progs, e.g., from quoth, several functions may have identical declarations like `void (???)`
  • Loading branch information
alexey-lysiuk committed Sep 22, 2024
1 parent 2e0def2 commit 3290cab
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Misc/qs_pak/scripts/expmode_progs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,13 @@ local function functions_onshow(self)
local entries = {}

for i, func in ipairs(functions) do
local entry = { func = func, index = tostring(i), declaration = tostring(func), filename = func.filename }
local entry =
{
func = func,
index = tostring(i),
declaration = format('%s##%i', func, i),
filename = func.filename
}
insert(entries, entry)
end

Expand Down

0 comments on commit 3290cab

Please sign in to comment.