mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-10-01 18:50:27 +03:00
Slightly less conservative message block max length
This commit is contained in:
@@ -188,8 +188,8 @@ public class TypeIO{
|
||||
case 4 -> {
|
||||
byte exists = read.b();
|
||||
if(exists != 0){
|
||||
//in a safe context, strings can only be 1000 chars
|
||||
yield read.str(safe ? 1000 : 0);
|
||||
//in a safe context, strings can only be 1200 chars
|
||||
yield read.str(safe ? 1200 : 0);
|
||||
}else{
|
||||
yield null;
|
||||
}
|
||||
|
||||
@@ -25,9 +25,9 @@ import static mindustry.Vars.*;
|
||||
|
||||
public class MessageBlock extends Block{
|
||||
private static final int maxByteLength = 999;
|
||||
//maximum UTF-8 length per char is 4, so 4*250 = 1000 bytes, the max byte array size
|
||||
/** maximum UTF-8 length per char is 4, so 4*300 = 1200 bytes, the max string byte size */
|
||||
@NoPatch
|
||||
public int maxTextLength = 250;
|
||||
public int maxTextLength = 300;
|
||||
public int maxNewlines = 24;
|
||||
|
||||
public MessageBlock(String name){
|
||||
|
||||
Reference in New Issue
Block a user