Permalink
Browse files

Merge pull request #689 from bwillard/master

Improve performance of parser.decodePayload
  • Loading branch information...
2 parents d9d529c + ebd2567 commit 8ff2edd79cee7436f65bdf94de976c09f8cae30f @rauchg rauchg committed Dec 16, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/parser.js
View
@@ -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 {

0 comments on commit 8ff2edd

Please sign in to comment.