From 82f8022f542aa4eb69a4097b42c743fb0a1e0bfd Mon Sep 17 00:00:00 2001 From: riking Date: Wed, 31 Jul 2013 17:43:25 -0700 Subject: [PATCH] Fix f49be46c - added code to wrong part of file --- .../gmail/nossr50/database/FlatfileDatabaseManager.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/gmail/nossr50/database/FlatfileDatabaseManager.java b/src/main/java/com/gmail/nossr50/database/FlatfileDatabaseManager.java index cc659665d..8cf21b833 100644 --- a/src/main/java/com/gmail/nossr50/database/FlatfileDatabaseManager.java +++ b/src/main/java/com/gmail/nossr50/database/FlatfileDatabaseManager.java @@ -116,10 +116,6 @@ public final class FlatfileDatabaseManager implements DatabaseManager { String line = ""; while ((line = in.readLine()) != null) { - // Length checks depend on last character being ':' - if (line.charAt(line.length() - 1) != ':') { - line = line + ":"; - } String[] character = line.split(":"); String name = character[0]; long lastPlayed; @@ -587,6 +583,10 @@ public final class FlatfileDatabaseManager implements DatabaseManager { String line = ""; while ((line = in.readLine()) != null) { + // Length checks depend on last character being ':' + if (line.charAt(line.length() - 1) != ':') { + line = line + ":"; + } String[] character = line.split(":"); // If they're valid, rewrite them to the file.