diff --git a/trunk/src/com/jpexs/decompiler/flash/SWFInputStream.java b/trunk/src/com/jpexs/decompiler/flash/SWFInputStream.java index bb4a2bf77..d158243ae 100644 --- a/trunk/src/com/jpexs/decompiler/flash/SWFInputStream.java +++ b/trunk/src/com/jpexs/decompiler/flash/SWFInputStream.java @@ -270,6 +270,7 @@ import java.io.IOException; import java.io.InputStream; import java.io.PrintStream; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; @@ -646,11 +647,13 @@ public class SWFInputStream extends InputStream { return new byte[0]; } byte[] ret = new byte[count]; + int i = 0; try { - for (int i = 0; i < count; i++) { + for (i = 0; i < count; i++) { ret[i] = (byte) readEx(); } } catch (EOFException | EndOfStreamException ex) { + ret = Arrays.copyOf(ret, i); // truncate array Logger.getLogger(SWFInputStream.class.getName()).log(Level.SEVERE, null, ex); } return ret; diff --git a/trunk/src/com/jpexs/decompiler/flash/gui/abc/LineMarkedEditorPane.java b/trunk/src/com/jpexs/decompiler/flash/gui/abc/LineMarkedEditorPane.java index 4a9340b78..1ef9741ab 100644 --- a/trunk/src/com/jpexs/decompiler/flash/gui/abc/LineMarkedEditorPane.java +++ b/trunk/src/com/jpexs/decompiler/flash/gui/abc/LineMarkedEditorPane.java @@ -16,6 +16,7 @@ */ package com.jpexs.decompiler.flash.gui.abc; +import com.jpexs.decompiler.flash.configuration.Configuration; import java.awt.Color; import java.awt.FontMetrics; import java.awt.Graphics; @@ -59,6 +60,9 @@ public class LineMarkedEditorPane extends UndoFixedEditorPane { @Override public void setText(String t) { lastLine = -1; + if (Configuration.debugMode.get() && t.length() > 4192) { + t = t.substring(0, 4192); + } super.setText(t); setCaretPosition(0); //scroll to top } diff --git a/trunk/src/com/jpexs/decompiler/graph/GraphTargetItem.java b/trunk/src/com/jpexs/decompiler/graph/GraphTargetItem.java index 8b06380be..1c7ea34b7 100644 --- a/trunk/src/com/jpexs/decompiler/graph/GraphTargetItem.java +++ b/trunk/src/com/jpexs/decompiler/graph/GraphTargetItem.java @@ -144,13 +144,6 @@ public abstract class GraphTargetItem implements Serializable { return false; } - /*public double toNumber() { - return 0; - } - - public boolean toBoolean() { - return Double.compare(toNumber(), 0.0) != 0; - }*/ public Object getResult() { return null; } diff --git a/trunk/src/com/jpexs/helpers/Helper.java b/trunk/src/com/jpexs/helpers/Helper.java index 155cbe79e..af975b8a0 100644 --- a/trunk/src/com/jpexs/helpers/Helper.java +++ b/trunk/src/com/jpexs/helpers/Helper.java @@ -660,7 +660,7 @@ public class Helper { } }*/ int length = data.length; - if (length > limit) { + if (limit != -1 && length > limit) { length = limit; } @@ -717,7 +717,7 @@ public class Helper { } writer.newLine(); - if (data.length > limit) { + if (limit != -1 && data.length > limit) { writer.appendNoHilight(AppStrings.translate("binaryData.truncateWarning").replace("%count%", Integer.toString(data.length - limit))); }