From b1c20f48b9596ee871580f7a1f43b066caf404aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Tue, 29 Dec 2015 12:03:56 +0100 Subject: [PATCH] Internal viewer - AS1/2 execution - jump fix --- src/com/jpexs/decompiler/flash/gui/ImagePanel.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/com/jpexs/decompiler/flash/gui/ImagePanel.java b/src/com/jpexs/decompiler/flash/gui/ImagePanel.java index 7f8bd2288..31e527695 100644 --- a/src/com/jpexs/decompiler/flash/gui/ImagePanel.java +++ b/src/com/jpexs/decompiler/flash/gui/ImagePanel.java @@ -861,17 +861,23 @@ public final class ImagePanel extends JPanel implements MediaDisplay { return Undefined.INSTANCE; } long ip = sis.getPos(); - + //System.err.println("============="); Action a; while ((a = sis.readAction()) != null) { int actionLengthWithHeader = a.getTotalActionLength(); - a.setAddress(sis.getPos()); + a.setAddress(ip); a.execute(lda); + /*System.err.print("" + a + ", stack: ["); + for (Object o : lda.stack) { + System.err.print("" + o + ","); + } + System.err.println("]");*/ if (lda.returnValue != null) { return lda.returnValue; } if (lda.jump != null) { ip = lda.jump; + lda.jump = null; } else { ip += actionLengthWithHeader; }