diff --git a/src/engine/wpak/PowersParser.java b/src/engine/wpak/PowersParser.java index f7cb82b6..91a33edf 100644 --- a/src/engine/wpak/PowersParser.java +++ b/src/engine/wpak/PowersParser.java @@ -19,6 +19,7 @@ import java.io.IOException; import java.nio.file.Files; import java.nio.file.Paths; import java.util.ArrayList; +import java.util.Arrays; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -52,12 +53,12 @@ public class PowersParser { try { - String[] powerEntries = powerData.trim().split("\n"); + String[] lineData = powerData.trim().split("\n"); ArrayList powerHeader = new ArrayList<>(); // Parse header - String headerString = powerEntries[0]; + String headerString = lineData[0]; headerString = headerString.replace("\n", " "); Matcher matcher = STRSPLIT_REGEX.matcher(headerString); @@ -109,6 +110,9 @@ public class PowersParser { // Process key value pairs after header + iterator = Arrays.stream(lineData).iterator(); + iterator.next(); // Ignore header + while (iterator.hasNext()) { String lineValue = iterator.next();