aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/shcm/shsupercm/fabric/citresewn
diff options
context:
space:
mode:
authorSHsuperCM <shsupercm@gmail.com>2022-02-05 14:14:43 +0200
committerSHsuperCM <shsupercm@gmail.com>2022-02-05 14:14:43 +0200
commit2a2ccd535ece8529b4c93922261d8ecbfe421b9e (patch)
treee6466666d653cddef03bb77e343942e73151108a /src/main/java/shcm/shsupercm/fabric/citresewn
parentb8572ff143d1d7f4d37472bcd1b15340aaaceea5 (diff)
downloadCITResewn-2a2ccd535ece8529b4c93922261d8ecbfe421b9e.tar.gz
CITResewn-2a2ccd535ece8529b4c93922261d8ecbfe421b9e.tar.bz2
CITResewn-2a2ccd535ece8529b4c93922261d8ecbfe421b9e.zip
Fixed property without separator passing null key
Diffstat (limited to 'src/main/java/shcm/shsupercm/fabric/citresewn')
-rw-r--r--src/main/java/shcm/shsupercm/fabric/citresewn/pack/format/PropertiesGroupAdapter.java5
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());