Some syntaxes are not well decompiled by Luadec, e.g:
function(event)
return (tonumber(event.arrdelay) or 0) > 0
end
produces
function(event)
do
return tonumber(event.arrdelay) or 0 > 0
end
end
workaround: writing it this way
function(event)
local delay = tonumber(event.arrdelay) or 0
return delay > 0
end
will produce
function(event)
local delay = tonumber(event.arrdelay) or 0
do
return delay > 0
end
end
function(accumulator, event)
carrier = accumulator[event.uniquecarrier] or {}
accumulator[event.uniquecarrier] = { count = (carrier.count or 0) + 1, total = (carrier.total or 0) + event.arrdelay }
return accumulator
end
produces
function(accumulator, event)
if not accumulator[event.uniquecarrier] then
carrier = {}
accumulator[event.uniquecarrier] = {count = (carrier.count or 0) + 1, total = (carrier.total or 0) + event.arrdelay}
return accumulator
end
end
workaround: writing it this way
function(accumulator, event)
local carrier
if accumulator[event.uniquecarrier] then
carrier = accumulator[event.uniquecarrier]
else
carrier = {}
end
accumulator[event.uniquecarrier] = { count = (carrier.count or 0) + 1, total = (carrier.total or 0) + event.arrdelay }
return accumulator
end
will produce
function(accumulator, event)
local carrier = nil
if accumulator[event.uniquecarrier] then
carrier = accumulator[event.uniquecarrier]
else
carrier = {}
end
accumulator[event.uniquecarrier] = {count = (carrier.count or 0) + 1, total = (carrier.total or 0) + event.arrdelay}
return accumulator
end
Some syntaxes are not well decompiled by Luadec, e.g:
produces
workaround: writing it this way
will produce
produces
workaround: writing it this way
will produce