viruscamp / luadec

Lua Decompiler for lua 5.1 , 5.2 and 5.3
1.14k stars 343 forks source link

if-if error #33

Closed viruscamp closed 9 years ago

viruscamp commented 9 years ago

source:

local a,b,c,d,e
if a then
    b()
    if c then
        d()
    end
end
e()

decompiled:

local a, b, c, d, e = nil
if a then
  b()
end
if c then
  d()
end
e()
viruscamp commented 9 years ago

see changes below : https://github.com/viruscamp/luadec-googlecode/commit/72539d3b608151a39712beb869833ad86e236b57#diff-4b4f7ad4d5c3974fbcf03b0d90f90743L2918 https://github.com/viruscamp/luadec-googlecode/commit/d2a185d2566f4ee0087b2d80751cbcb6ba9a8060#diff-4b4f7ad4d5c3974fbcf03b0d90f90743L2936 https://github.com/viruscamp/luadec-googlecode/commit/1689e33a04efa7874a468363853e8f7d8ff1306a#diff-4b4f7ad4d5c3974fbcf03b0d90f90743L2949 https://github.com/viruscamp/luadec-googlecode/commit/5680b56a31dbe9ed4f7d2bc9c6b4933d0349049b#diff-4b4f7ad4d5c3974fbcf03b0d90f90743L2965

viruscamp commented 9 years ago

fixed in 1f92eb3