JPEXS Free Flash Decompiler Issue Tracker

If you are looking for the decompiler itself, visit https://github.com/jindrapetrik/jpexs-decompiler

NEW : We have got a new blog where we post some interesting SWF internals info.

List of issuesList of issues

#347 AS3 for loop with return decompiled as while inversed
Author: user pepka
Date created:
Type: question
Visibility: Everybody
Assigned to: admin JPEXS
State: closed Help

> What is the expected output? What do you see instead? private function example(param1:int, param2:int):int { var var1:Object = null; var var2:int = -1; param2--; for (;;) { if (var1.x + var1.y > 0 && param1 < 0) { return var2 + 5; } } return var2; } is decompiled as private function example(param1:int, param2:int) : int { var var1:Object = null; var var2:* = -1; param2--; while(!(var1.x + var1.y > 0 && param1 < 0)) { } return var2 + 5; } > What version of the product are you using? On what operating system? 1.7.0u1
DownloadMain.as (1 KiB)
user
May I ask you what's the fucking point in attaching the source code instead of the compiled swf?
admin
Please do not use coarse language here, thanks. I think it is not a problem in this particular case, because the example is simple and I can easily compile it myself.
admin
Ok... I took another look on the code now (after 2 years) and found these two codes equal: In your code the "return var2" is never reached, so it is is correctly ignored by the decompiler. Your for loop breaks only when the if condition is met => (var1.x + var1.y > 0 && param1 < 0) So in fact, the loop continues when inverse loop is met => !(var1.x + var1.y > 0 && param1 < 0) Both codes are equivalent and I cannot distingish between them. If you agree I'll close this issue.
State: new→upgraded
Title: AS3 improper decompilation→AS3 for loop with return decompiled as while inversed
Type: bug→question
Assigned:admin JPEXS
developer
I close this issue due to inactivity. Please create new issue if problem persists.
State: upgraded→closed