This commit is contained in:
Anuken
2023-06-26 18:48:57 -04:00
parent 1bc3ac8761
commit 023ec9f66b

View File

@@ -30,7 +30,7 @@ import java.util.zip.*;
import static mindustry.Vars.*;
public class LogicBlock extends Block{
private static final int maxByteLen = 1024 * 500;
private static final int maxByteLen = 1024 * 100;
public int maxInstructionScale = 5;
public int instructionsPerTick = 1;
@@ -176,7 +176,7 @@ public class LogicBlock extends Block{
int bytelen = stream.readInt();
if(bytelen > maxByteLen) throw new RuntimeException("Malformed logic data! Length: " + bytelen);
if(bytelen > maxByteLen) throw new RuntimeException("Logic data too long or malformed! Length: " + bytelen);
byte[] bytes = new byte[bytelen];
stream.readFully(bytes);