Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

combine two substr calls into one in decodePayload to improve perform…

…ance
  • Loading branch information...
commit ebd25676ee562417694e3cc3cd4c1d69f9e7d80e 1 parent d9d529c
@bwillard bwillard authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/parser.js
View
2  lib/parser.js
@@ -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 {
Please sign in to comment.
Something went wrong with that request. Please try again.