parent
4a79e7e6c8
commit
b8db91bff6
|
@ -39,7 +39,9 @@ class MinecraftVanilla extends Core {
|
||||||
const strLen = reader.varint();
|
const strLen = reader.varint();
|
||||||
this.debugLog("String Length: "+strLen);
|
this.debugLog("String Length: "+strLen);
|
||||||
|
|
||||||
const str = reader.rest().toString('utf8');
|
const rest = reader.rest()
|
||||||
|
|
||||||
|
const str = rest.toString('utf8', 0, strLen)
|
||||||
this.debugLog(str);
|
this.debugLog(str);
|
||||||
|
|
||||||
const json = JSON.parse(str.substring(0, strLen));
|
const json = JSON.parse(str.substring(0, strLen));
|
||||||
|
@ -67,8 +69,8 @@ class MinecraftVanilla extends Core {
|
||||||
// Better Compatibility Checker mod support
|
// Better Compatibility Checker mod support
|
||||||
let bccJson = {}
|
let bccJson = {}
|
||||||
|
|
||||||
if (str.length > strLen) {
|
if (rest.length > strLen) {
|
||||||
const bccStr = str.substring(strLen + 1);
|
const bccStr = rest.toString('utf8', strLen + 1);
|
||||||
bccJson = JSON.parse(bccStr);
|
bccJson = JSON.parse(bccStr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue