From 926497ba778b8cc981b6cc5607b8bb67ef73e1b8 Mon Sep 17 00:00:00 2001 From: DeltaNedas Date: Sun, 13 Dec 2020 19:30:21 +0000 Subject: [PATCH] disallow descriptions after mod version --- core/src/mindustry/mod/Mods.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/core/src/mindustry/mod/Mods.java b/core/src/mindustry/mod/Mods.java index a2706a0723..4c6605fbbf 100644 --- a/core/src/mindustry/mod/Mods.java +++ b/core/src/mindustry/mod/Mods.java @@ -647,6 +647,14 @@ public class Mods implements Loadable{ meta.hidden = true; } + //disallow putting a description after the version + if(meta.version != null){ + int line = meta.version.indexOf('\n'); + if(line != -1){ + meta.version = meta.version.substring(0, line); + } + } + if(!headless){ Log.info("Loaded mod '@' in @ms", meta.name, Time.elapsed()); }