From 8d61bacf5d0902cbaa3c5b3d7ebcd990bd95012a Mon Sep 17 00:00:00 2001 From: Su5eD Date: Wed, 4 Oct 2023 13:44:52 +0200 Subject: [PATCH] Handle macOS CR line endings as well --- .../net/minecraftforge/fml/loading/moddiscovery/ModInfo.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/loader/src/main/java/net/minecraftforge/fml/loading/moddiscovery/ModInfo.java b/loader/src/main/java/net/minecraftforge/fml/loading/moddiscovery/ModInfo.java index 8ca516be3..aaeae73b3 100644 --- a/loader/src/main/java/net/minecraftforge/fml/loading/moddiscovery/ModInfo.java +++ b/loader/src/main/java/net/minecraftforge/fml/loading/moddiscovery/ModInfo.java @@ -80,8 +80,8 @@ public ModInfo(final ModFileInfo owningFile, final IConfigurable config) this.displayName = config.getConfigElement("displayName") .orElse(this.modId); this.description = config.getConfigElement("description") - // Normalize CRLF line endings to use LF instead - .map(desc -> desc.replace("\r\n", "\n")) + // Normalize line endings to use LF instead + .map(desc -> desc.replace("\r\n", "\n").replace("\r", "\n")) .orElse("MISSING DESCRIPTION"); this.logoFile = Optional.ofNullable(config.getConfigElement("logoFile") .orElseGet(() -> ownFile.flatMap(mf -> mf.getConfigElement("logoFile"))