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