Commit 0dd016d8926ce88efd59ac761e45abb5a026e9fa
1 parent
95060d93
trim the *correct* number of characters from the end of the target node
Showing
1 changed file
with
2 additions
and
2 deletions
java/common/com/mumfrey/liteloader/transformers/event/json/JsonInjection.java
@@ -145,12 +145,12 @@ public class JsonInjection implements Serializable | @@ -145,12 +145,12 @@ public class JsonInjection implements Serializable | ||
145 | { | 145 | { |
146 | if (this.target.startsWith("before(") && this.target.endsWith(")")) | 146 | if (this.target.startsWith("before(") && this.target.endsWith(")")) |
147 | { | 147 | { |
148 | - this.target = this.target.substring(7, this.target.length() - 8); | 148 | + this.target = this.target.substring(7, this.target.length() - 1); |
149 | this.shift = JsonInjectionShiftType.BEFORE; | 149 | this.shift = JsonInjectionShiftType.BEFORE; |
150 | } | 150 | } |
151 | else if (this.target.startsWith("after(") && this.target.endsWith(")")) | 151 | else if (this.target.startsWith("after(") && this.target.endsWith(")")) |
152 | { | 152 | { |
153 | - this.target = this.target.substring(6, this.target.length() - 7); | 153 | + this.target = this.target.substring(6, this.target.length() - 1); |
154 | this.shift = JsonInjectionShiftType.AFTER; | 154 | this.shift = JsonInjectionShiftType.AFTER; |
155 | } | 155 | } |
156 | } | 156 | } |