Commit 0dd016d8926ce88efd59ac761e45abb5a026e9fa

Authored by Mumfrey
1 parent 95060d93

trim the *correct* number of characters from the end of the target node

java/common/com/mumfrey/liteloader/transformers/event/json/JsonInjection.java
... ... @@ -145,12 +145,12 @@ public class JsonInjection implements Serializable
145 145 {
146 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 149 this.shift = JsonInjectionShiftType.BEFORE;
150 150 }
151 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 154 this.shift = JsonInjectionShiftType.AFTER;
155 155 }
156 156 }
... ...