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.
This commit is contained in:
James Clarke committed 2013-03-22 09:19:39 +00:00
1 parent 012a755bb9
commit d1ff1967b5
1 file changed
+1 -1
@@ -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;