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.

#46 if then else with empty branches gets ignored
Author:
googleCode

Date created:
Type: bug
Visibility: Everybody
Assigned to:
Labels: DecompilationGoogle Code
State: closed 

<b>What steps will reproduce the problem?</b>
1. Adding if then else and if then else inside.
What is the expected output?
if (_loc1_ == "test1")
{
trace("test 1");
if (_loc2_ == "test2")
{
trace("test 2");
}
else {
trace("else 2");
}
}
else {
trace("else 1");
}
What do you see instead?
if(_loc2_=="test1")
{
}
<b>What version of the product are you using? On what operating system?</b>
1.4.1 on windows 7 64 bit
<b>Could you provide the SWF file you have problem with?</b>
<b>If the answer is yes, then please attach it here or send me it via email.</b>
<b>Could you at least attach PCode source?</b>
<b>Do you have the original source code which produced the wrong</b>
<b>decompilation? If yes, then please attach it.</b>
<b>Please provide any additional information below.</b>
hi,
the trace commands are ignored during compilation with your compiler.
The decompiler ignores if commands when there are no commands in both if and else
branches, e. g.
pushbyte 1
pushbyte 2
ifeq loc1
loc1:
However in some cases the if should be visible, because the condition can have
side-effect, like
if(exec()){
}else{
}
I will look on it, and fix it.
The code should then look like this:
if(_loc2_=="test1")
{
if (_loc2_ == "test2")
{
}
}
Hi,
this is fixed in version 1.4.2, try it.
State: →closed
Title: if then else with empty branches gets ignored→if then else with empty branches gets ignored
Type: →bug
Visibility: →Everybody
Title: if then else with empty branches gets ignored→if then else with empty branches gets ignored
Type: →bug
Visibility: →Everybody