diff --git a/libsrc/debugswf/com/jpexs/decompiler/flash/debugger/DebugConnection.as b/libsrc/debugswf/com/jpexs/decompiler/flash/debugger/DebugConnection.as index 4d0008532..0a5e01a62 100644 --- a/libsrc/debugswf/com/jpexs/decompiler/flash/debugger/DebugConnection.as +++ b/libsrc/debugswf/com/jpexs/decompiler/flash/debugger/DebugConnection.as @@ -26,7 +26,8 @@ private static function writeString(msg){ var b:ByteArray = new ByteArray(); b.writeUTFBytes(msg); - s.writeByte(b.length); + s.writeByte((b.length>>8) & 0xff); + s.writeByte(b.length & 0xff); s.writeBytes(b,0,b.length); } diff --git a/src/com/jpexs/decompiler/flash/gui/debugger/Debugger.java b/src/com/jpexs/decompiler/flash/gui/debugger/Debugger.java index c7cdb3dbb..b6dc83336 100644 --- a/src/com/jpexs/decompiler/flash/gui/debugger/Debugger.java +++ b/src/com/jpexs/decompiler/flash/gui/debugger/Debugger.java @@ -51,25 +51,31 @@ public class Debugger { } } - private String readString(InputStream is) throws IOException - { + private String readString(InputStream is) throws IOException { int len = is.read(); - if (len == -1) { - throw new EOFException(); - } - byte buf[] = new byte[len]; - for(int i=0;i