mirror of
https://github.com/unmojang/node-minecraft-protocol.git
synced 2025-10-03 07:59:50 -04:00
set unavailable fields to null
This commit is contained in:
parent
170566d700
commit
de220e1fa1
@ -1450,8 +1450,10 @@ function parsePacket(buffer, isServer) {
|
||||
for (i = 0; i < packetInfo.length; ++i) {
|
||||
fieldInfo = packetInfo[i];
|
||||
var condition = fieldInfo.condition;
|
||||
if (typeof condition != "undefined" && !condition(results))
|
||||
if (typeof condition != "undefined" && !condition(results)) {
|
||||
results[fieldInfo.name] = null;
|
||||
continue;
|
||||
}
|
||||
readResults = readPacketField(fieldInfo);
|
||||
if (!readResults || readResults.error) {
|
||||
return readResults;
|
||||
|
Loading…
x
Reference in New Issue
Block a user