If you are looking for the decompiler itself, visit https://github.com/jindrapetrik/jpexs-decompiler
NEW : You can now close your own issues and reopen them later if needed. You can also comment closed issues.
List of issues#2749 The file cannot be saved if it contains a labeled break statement.
Author:
Riki_Akyama
Riki_AkyamaDate created:
Type: bug
Visibility: Everybody
Assigned to:
Labels: AS1/2
State: upgraded 

If an ActionScript file contains a labeled break statement, an error occurs when try to
save the file itself.
class strikerComp extends playerComp
{
var buttai_mc;
var o;
function strikerComp()
{
super();
}
function OL()
{
this.o = {};
var _loc2_;
for(var _loc3_ in this)
{
_loc2_ = this[_loc3_];
loop2: //An error occurred here
switch(typeof _loc2_)
{
case "string":
case "number":
case "boolean":
_loc2_;
switch(_loc5_)
{
default:
this.o[_loc3_] = _loc2_;
break loop2;
case null:
case "inherit":
case "":
break loop2;
}
}
}
for(_loc3_ in this.o)
{
this.buttai_mc.oAttack = this.o[_loc3_];
}
}
}
Stable version 26.2.1(Windows)
error.png (126 KiB)ActionScript 2 does not support labeled breaks, so that's why it throws an error.
Does this source code come from an existing SWF file (was decompiled this way)
or did you write it on your own?
If it was decompiled this way, then we must fix FFDec so it produced valid code without
labeled break.
Also, please try nightly build. I remember we already did some changes related to these
since last stable.
It took a while, but I was able to get my hands on the .AS file before it was compiled.
class attackComp extends playerComp {
private var o;
function attackComp () {
}
function OL() {
o={};
for(var i in this) {
var ti=this[i];
switch(typeof(ti)) {
case "string":
case "number":
case "boolean":
break;
default :
continue;
break;
}
switch(ti) {
case null:
case "inherit":
case "":
continue;
break;
default :
o[i]=ti;
break;
}
}
for(var i in o) {
buttai_mc.attack_obj[i]=o[i];
}
}
It seems the decompilation of the `continue` statement has failed.
GitHub commit - fix: fix another unnecessary labeled breaks (#2749)
Upcoming nightly version: 3572
Nightly version 3572 released.
It should be better in nightly 3572.
State: new→upgraded
