Merge pull request #689 from bwillard/master

Improve performance of parser.decodePayload
This commit is contained in:
Guillermo Rauch
2011-12-16 14:04:12 -08:00

View File

@@ -234,7 +234,7 @@ exports.decodePayload = function (data) {
for (var i = 1, length = ''; i < data.length; i++) {
if (data[i] == '\ufffd') {
ret.push(exports.decodePacket(data.substr(i + 1).substr(0, length)));
ret.push(exports.decodePacket(data.substr(i + 1, length)));
i += Number(length) + 1;
length = '';
} else {