From 84684cf3b653aae8048b15ea5a3856898cd8571f 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. --- fml/common/cpw/mods/fml/relauncher/FMLRelaunchLog.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fml/common/cpw/mods/fml/relauncher/FMLRelaunchLog.java b/fml/common/cpw/mods/fml/relauncher/FMLRelaunchLog.java index cd3785875..4dabf3c42 100644 --- a/fml/common/cpw/mods/fml/relauncher/FMLRelaunchLog.java +++ b/fml/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;