JPEXS Free Flash Decompiler Issue Tracker

If you are looking for the decompiler itself, visit

List of issuesList of issues

#28 ifne is ifeq
Date created:
Type: bug
Visibility: Everybody
Assigned to:
Labels: AS3DecompilationGoogle CodeP-code
State: ignored Help

<b>What steps will reproduce the problem?</b> 1. Using ifne will make an ifeq <b>2.</b> <b>3.</b> <b>What is the expected output? What do you see instead?</b> Using ifne should be if not equal !=, but is using ifeq if equal == instead. This can't detect if local1 contains hey, which it should do. getlocal_1 pushstring &quot;hey&quot; ifeq ofs0001 //Some random code here ofs001:returnvoid This will detect the message hey, and its using if not equal.. getlocal_1 pushstring &quot;hey&quot; ifne ofs0001 //Some random code here ofs001:returnvoid <b>What version of the product are you using? On what operating system?</b> 1.1.0 Windows 7 <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, getlocal_1 pushstring "hey" ifeq ofs0001 //when not eq ofs0001: means that if the values on the stack are the same, then jump to ofs0001. The code between "ifeq ofs0001" and "ofs0001" is executed when the values are different. So this is translated as if(loc1!="hey"){ //when not eq } I don't see a problem here. Could you provide more details where the problem is? You write ifeq in the pcode and it is changed to ifne? Or the decompiled text is wrong?
I use ifne, because it works as ifeq. Which it shouldnt do at all. When I edit the p-code, and I have added a ifne, i see (param1 == "hey"), and it doesn't show (param1 != "hey") which it should do. So I guess something is messed up.
Yes, that is true, the meaning is "inverted". It is not messed up, this is how PCode works. The "ifeq" means, when the values are equal, then JUMP. When Flash executes this instruction and the values are equal, then it skips all the code between "ifeq ofs1" and the label name "ofs1:". When the values are not equal, no JUMP is done and code between "ifeq ofs1" and the label name "ofs1:" is executed.
State: →ignored
Title: ifne is ifeq→ifne is ifeq
Type: →bug
Visibility: →Everybody