From 833df2039c8bf373b46181df47865bf875f76d91 Mon Sep 17 00:00:00 2001 From: Luke Young Date: Wed, 14 May 2014 13:44:43 -0500 Subject: [PATCH] Fix Spawn Object Packet Parsing If read fails a pre-condition within a container, skip it --- lib/protocol.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/protocol.js b/lib/protocol.js index 4296cab..31e3c89 100644 --- a/lib/protocol.js +++ b/lib/protocol.js @@ -1101,6 +1101,7 @@ function readContainer(buffer, offset, typeArgs, rootNode) { rootNode.this = results.value; for (var index in typeArgs.fields) { var readResults = read(buffer, offset, typeArgs.fields[index], rootNode); + if (readResults == null) { continue; } results.size += readResults.size; offset += readResults.size; results.value[typeArgs.fields[index].name] = readResults.value;