mirror of
https://github.com/unmojang/node-minecraft-protocol.git
synced 2025-09-30 06:30:39 -04:00
Fix anon structures not working in sizeOf
This commit is contained in:
parent
968617eab8
commit
86f1f23053
@ -141,6 +141,9 @@ function sizeOfContainer(value, typeArgs, rootNode) {
|
|||||||
rootNode.this = value;
|
rootNode.this = value;
|
||||||
for(var index in typeArgs) {
|
for(var index in typeArgs) {
|
||||||
tryCatch(() => {
|
tryCatch(() => {
|
||||||
|
if (typeArgs[index].anon)
|
||||||
|
size += this.sizeOf(value, typeArgs[index].type, rootNode);
|
||||||
|
else
|
||||||
size += this.sizeOf(value[typeArgs[index].name], typeArgs[index].type, rootNode);
|
size += this.sizeOf(value[typeArgs[index].name], typeArgs[index].type, rootNode);
|
||||||
}, (e) => {
|
}, (e) => {
|
||||||
addErrorField(e, index);
|
addErrorField(e, index);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user