This commit is contained in:
honfika@gmail.com
2015-09-25 13:40:12 +02:00
parent d1ab311982
commit 079cf8a56c
3 changed files with 15 additions and 2 deletions

View File

@@ -181,7 +181,8 @@ public class ActionDeobfuscator extends ActionDeobfuscatorSimple {
}
}
int unreachableCount = actions.getUnreachableActions(i, result.idx).size();
List<Action> unreachable = actions.getUnreachableActions(i, result.idx);
int unreachableCount = unreachable == null ? 0 : unreachable.size();
if (allValueValid && newIstructionCount + 2 < unreachableCount) {
Action target = actions.get(result.idx);

View File

@@ -154,7 +154,8 @@ public class ActionDeobfuscatorSimple implements SWFDecompilerListener {
if (result.idx != -1) {
int newIstructionCount = 1 /*jump */ + result.stack.size();
int unreachableCount = actions.getUnreachableActions(i, result.idx).size();
List<Action> unreachable = actions.getUnreachableActions(i, result.idx);
int unreachableCount = unreachable == null ? 0 : unreachable.size();
if (newIstructionCount < unreachableCount) {
Action target = actions.get(result.idx);

View File

@@ -156,6 +156,17 @@ public class DirectValueActionItem extends ActionItem implements SimpleValue {
@Override
public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) {
if (value instanceof Double) {
if (Double.compare((double) (Double) value, 0) == 0) {
return writer.append("0");
}
}
if (value instanceof Float) {
if (Float.compare((float) (Float) value, 0) == 0) {
return writer.append("0");
}
}
if (value instanceof String) {
return writer.append("\"").append(Helper.escapeActionScriptString((String) value)).append("\"");
}