AS1/2 loops compilation fix

This commit is contained in:
Jindra Petřík
2014-09-20 21:09:43 +02:00
parent 3d9e2b76ed
commit 60f7e5e36f
2 changed files with 4 additions and 4 deletions

View File

@@ -181,8 +181,8 @@ public class ActionSourceGenerator implements SourceGenerator {
private void fixLoop(List<Action> code, int breakOffset, int continueOffset) {
int pos = 0;
for (Action a : code) {
pos += a.getTotalActionLength();
for (Action a : code) {
pos += a.getBytes(SWF.DEFAULT_VERSION).length;
if (a instanceof ActionJump) {
ActionJump aj = (ActionJump) a;
if (aj.isContinue && (continueOffset != Integer.MAX_VALUE)) {