fix: actionscript and/or operators with simple value operands (#2680)

Fixes #2680
This commit is contained in:
Jindra Petřík
2026-03-26 20:44:26 +01:00
parent 35e3ec67e3
commit db6f49fbf8
19 changed files with 267 additions and 66 deletions

View File

@@ -48,6 +48,7 @@ public class ActionScript2Test extends ActionScript2TestBase {
Configuration.decompile.set(true);
Configuration.registerNameFormat.set("_loc%d_");
Configuration.autoRenameIdentifiers.set(false);
Configuration.skipDetectionOfUninitializedClassFields.set(false);
swf = new SWF(new BufferedInputStream(new FileInputStream("testdata/as2/as2.swf")), false);
}
@@ -2669,5 +2670,17 @@ public class ActionScript2Test extends ActionScript2TestBase {
+ "}\r\n"
);
}
@Test
public void frame98_andIntTest() {
compareSrc(98, "trace(\"andIntTest\");\r\n"
+ "var a = 1;\r\n"
+ "var b = 5;\r\n"
+ "if(0 && (1 || a < b))\r\n"
+ "{\r\n"
+ "trace(\"okay\");\r\n"
+ "}\r\n"
);
}
//--FRAMES-END--
}