From d1ff1967b50f2ff2edf0b60acdb6508c0a3eeb06 Mon Sep 17 00:00:00 2001 From: James Clarke Date: Fri, 22 Mar 2013 09:19:39 +0000 Subject: [PATCH] Fixed FMLRelaunchLog's Newline Handling System.out.println("\n") causes currentMessage to start with a newline character, which means idx will always be 0 from then on. Therefore if idx is 0 messages must still be logged, otherwise no more messages sent to stdout will be logged and they will just accumulate in currentMessage. --- common/cpw/mods/fml/relauncher/FMLRelaunchLog.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/cpw/mods/fml/relauncher/FMLRelaunchLog.java b/common/cpw/mods/fml/relauncher/FMLRelaunchLog.java index cd3785875f..4dabf3c425 100644 --- a/common/cpw/mods/fml/relauncher/FMLRelaunchLog.java +++ b/common/cpw/mods/fml/relauncher/FMLRelaunchLog.java @@ -113,7 +113,7 @@ public class FMLRelaunchLog // Are we longer than just the line separator? int lastIdx = -1; int idx = currentMessage.indexOf("\n",lastIdx+1); - while (idx > 0) + while (idx >= 0) { log.log(Level.INFO, currentMessage.substring(lastIdx+1,idx)); lastIdx = idx;