From 0d57f0b430a6be3b3bb8804d955f76d5a4bc8167 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jindra=20Pet=C5=99=C3=ADk?= Date: Sun, 8 Jun 2014 14:04:39 +0200 Subject: [PATCH] Issue #501: GotoFrame2 fix, telltarget misc --- .../flash/action/model/GotoFrame2ActionItem.java | 2 +- .../flash/action/model/clauses/TellTargetActionItem.java | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/com/jpexs/decompiler/flash/action/model/GotoFrame2ActionItem.java b/src/com/jpexs/decompiler/flash/action/model/GotoFrame2ActionItem.java index 1c19f2fa1..f49daa243 100644 --- a/src/com/jpexs/decompiler/flash/action/model/GotoFrame2ActionItem.java +++ b/src/com/jpexs/decompiler/flash/action/model/GotoFrame2ActionItem.java @@ -76,7 +76,7 @@ public class GotoFrame2ActionItem extends ActionItem { @Override public List toSource(SourceGeneratorLocalData localData, SourceGenerator generator) throws CompilationException { if (!sceneBiasFlag && (frame instanceof DirectValueActionItem) && (((DirectValueActionItem) frame).value instanceof Long)) { - return toSourceMerge(localData, generator, frame, new ActionGotoFrame((int) ((long) (Long) ((DirectValueActionItem) frame).value) - 1), playFlag ? new ActionPlay() : null); + return toSourceMerge(localData, generator, new ActionGotoFrame((int) ((long) (Long) ((DirectValueActionItem) frame).value) - 1), playFlag ? new ActionPlay() : null); } else { return toSourceMerge(localData, generator, frame, new ActionGotoFrame2(playFlag, sceneBiasFlag, sceneBias)); } diff --git a/src/com/jpexs/decompiler/flash/action/model/clauses/TellTargetActionItem.java b/src/com/jpexs/decompiler/flash/action/model/clauses/TellTargetActionItem.java index cc0caa59c..c38799f63 100644 --- a/src/com/jpexs/decompiler/flash/action/model/clauses/TellTargetActionItem.java +++ b/src/com/jpexs/decompiler/flash/action/model/clauses/TellTargetActionItem.java @@ -53,7 +53,7 @@ public class TellTargetActionItem extends ActionItem { writer.append("{").newLine(); writer.indent(); for (GraphTargetItem ti : commands) { - ti.toString(writer, localData).newLine(); + ti.toStringSemicoloned(writer, localData).newLine(); } writer.unindent(); return writer.append("}"); @@ -80,6 +80,11 @@ public class TellTargetActionItem extends ActionItem { return ret; } + @Override + public boolean needsSemicolon() { + return false; + } + @Override public boolean hasReturnValue() { return false;