diff options
Diffstat (limited to 'src/main/java/shcm')
-rw-r--r-- | src/main/java/shcm/shsupercm/fabric/citresewn/pack/format/PropertiesGroupAdapter.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/java/shcm/shsupercm/fabric/citresewn/pack/format/PropertiesGroupAdapter.java b/src/main/java/shcm/shsupercm/fabric/citresewn/pack/format/PropertiesGroupAdapter.java index bfa4091..fb694ae 100644 --- a/src/main/java/shcm/shsupercm/fabric/citresewn/pack/format/PropertiesGroupAdapter.java +++ b/src/main/java/shcm/shsupercm/fabric/citresewn/pack/format/PropertiesGroupAdapter.java @@ -20,7 +20,7 @@ public class PropertiesGroupAdapter extends PropertyGroup { } @Override - public PropertyGroup load(String packName, Identifier identifier, InputStream is) throws IOException, InvalidIdentifierException { + public PropertyGroup load(String packName, Identifier identifier, InputStream is) throws IOException { try (BufferedReader reader = new BufferedReader(new InputStreamReader(is, StandardCharsets.UTF_8))) { String line; int linePos = 0, multilineSkip = 0; @@ -93,6 +93,9 @@ public class PropertiesGroupAdapter extends PropertyGroup { builder.append(c); } + if (key == null) + throw new IOException("Missing separator in line " + linePos); + int pos = linePos - multilineSkip; multilineSkip = 0; this.put(pos, packName, identifier, key, keyMetadata, "=", builder.toString()); |