From f49be46cec2ef18a7d8aede58a675f41899c773a Mon Sep 17 00:00:00 2001 From: riking Date: Wed, 31 Jul 2013 16:53:06 -0700 Subject: [PATCH] Add check for manual edits leaving out trailing colon --- .../com/gmail/nossr50/database/FlatfileDatabaseManager.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/com/gmail/nossr50/database/FlatfileDatabaseManager.java b/src/main/java/com/gmail/nossr50/database/FlatfileDatabaseManager.java index 069683b3d..8c4be2835 100644 --- a/src/main/java/com/gmail/nossr50/database/FlatfileDatabaseManager.java +++ b/src/main/java/com/gmail/nossr50/database/FlatfileDatabaseManager.java @@ -116,6 +116,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(":"); String name = character[0]; long lastPlayed = StringUtils.getLong(character[37]) * Misc.TIME_CONVERSION_FACTOR;