mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-06-28 18:35:34 +00:00
Issue #442 Decompilation regression since nightly ffdec_1.7.4_db2388c37836: fixed
This commit is contained in:
@@ -119,6 +119,7 @@ import java.awt.image.BufferedImage;
|
||||
import java.io.BufferedOutputStream;
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.EOFException;
|
||||
import java.io.File;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
@@ -532,8 +533,11 @@ public final class SWF {
|
||||
sos.writeUI32(fileSize);
|
||||
InflaterInputStream iis = new InflaterInputStream(fis);
|
||||
int i;
|
||||
while ((i = iis.read()) != -1) {
|
||||
fos.write(i);
|
||||
try {
|
||||
while ((i = iis.read()) != -1) {
|
||||
fos.write(i);
|
||||
}
|
||||
} catch (EOFException ex) {
|
||||
}
|
||||
fis.close();
|
||||
fos.close();
|
||||
|
||||
@@ -175,10 +175,12 @@ public class DirectValueActionItem extends ActionItem {
|
||||
|
||||
@Override
|
||||
public boolean isCompileTime(Set<GraphTargetItem> dependencies) {
|
||||
if (dependencies.contains(computedRegValue)) {
|
||||
return false;
|
||||
if (computedRegValue != null) {
|
||||
if (dependencies.contains(computedRegValue)) {
|
||||
return false;
|
||||
}
|
||||
dependencies.add(computedRegValue);
|
||||
}
|
||||
dependencies.add(computedRegValue);
|
||||
return (value instanceof Double) || (value instanceof Float) || (value instanceof Boolean) || (value instanceof Long) || (value instanceof Null) || (computedRegValue != null && computedRegValue.isCompileTime(dependencies)) || (value instanceof String) || (value instanceof ConstantIndex);
|
||||
}
|
||||
|
||||
|
||||
@@ -1787,7 +1787,6 @@ public class Graph {
|
||||
currentRet.add(new IfItem(null, expr, onTrue, onFalse));
|
||||
}
|
||||
if (next != null) {
|
||||
/* todo: honfika
|
||||
if (trueStack.size() != trueStackSizeBefore || falseStack.size() != falseStackSizeBefore) {
|
||||
// it's a hack, because duplicates all instructions in the next part, but better than EmptyStackException
|
||||
onTrue = printGraph(visited, localData, trueStack, allParts, part, next, stopPart, loops, null, staticOperation, path, recursionLevel + 1);
|
||||
@@ -1799,8 +1798,7 @@ public class Graph {
|
||||
}
|
||||
} else {
|
||||
printGraph(visited, localData, stack, allParts, part, next, stopPart, loops, currentRet, staticOperation, path, recursionLevel + 1);
|
||||
}*/
|
||||
printGraph(visited, localData, stack, allParts, part, next, stopPart, loops, currentRet, staticOperation, path, recursionLevel + 1);
|
||||
}
|
||||
//currentRet.addAll();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ public abstract class BinaryOpItem extends GraphTargetItem implements BinaryOp {
|
||||
return false;
|
||||
}
|
||||
dependencies.add(leftSide);
|
||||
if (dependencies.contains(rightSide)) {
|
||||
if (leftSide != rightSide && dependencies.contains(rightSide)) {
|
||||
return false;
|
||||
}
|
||||
dependencies.add(rightSide);
|
||||
|
||||
Reference in New Issue
Block a user