mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/jpexs-decompiler.git
synced 2026-09-26 06:50:51 +00:00
test for removing extra jumps (currently fails), small issue with ActionEnd fixed
This commit is contained in:
@@ -352,13 +352,15 @@ public class Action implements GraphSourceItem {
|
||||
*/
|
||||
public static byte[] actionsToBytes(List<Action> list, boolean addZero, int version) {
|
||||
ByteArrayOutputStream baos = new ByteArrayOutputStream();
|
||||
Action lastAction = null;
|
||||
for (Action a : list) {
|
||||
try {
|
||||
lastAction = a;
|
||||
baos.write(a.getBytes(version));
|
||||
} catch (IOException e) {
|
||||
}
|
||||
}
|
||||
if (addZero) {
|
||||
if (addZero && (lastAction == null || !(lastAction instanceof ActionEnd))) {
|
||||
baos.write(0);
|
||||
}
|
||||
return baos.toByteArray();
|
||||
|
||||
Reference in New Issue
Block a user