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.

#2489 Pushing undefineds after play(), gotoAndPlay() and similar in the expression
Author:
JPEXS

Date created:
Type: bug
Visibility: Everybody
Assigned to:
Labels: AS1/2
State: new 

> What steps will reproduce the problem?
Compile following AS1 code in CS6:
```
var a = play();
```
The p-code generated is:
```
Push "a"
Play
Push undefined
Push undefined
DefineLocal
```
> What is the expected output? What do you see instead?
Expected decompilation to be the same as input.
Instead I see:
```
play();
var undefined;
§§push("a");
```
> What version of the product are you using? Is it "nightly build"? Which operating system
do you have?
24.0.1 nightly 3247. Windows 11.
> Please provide any additional information below. If the problem is related to a SWF
file, attach it here, otherwise we can't help you.
It seems it does also with gotoAndPlay and maybe others.
Attached sample file.

This seems to be a bug in CS6 compiler (probably in lower versions too).
The compiler should clearly generate only single one Push undefined, not two, in these
cases.
However, it does generate two wherever a void action in an expression is used.
I don't know how to handle these.
If I remove two push undefineds after every void action,
there will be problem when the undefineds are really used.
For example in following code:
```
function f(a, b)
{
return 1;
}
stop();
trace(f(undefined,undefined));
```
which is compiled as:
```
DefineFunction "f", 2, "a" , "b" {
Push 1
Return
}
Stop
Push undefined, undefined, 2, "f"
CallFunction
Trace
```
This also produces two undefineds after stop, but these all fully legal.