Skip to content

Commit e885fbc

Browse files
committed
use unsigned arg for long and convert to numbers
1 parent 2850383 commit e885fbc

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/packets/packet.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,9 @@ Packet.prototype.readLengthCodedNumberExt = function (tag, bigNumberStrings, sig
146146
return word1 * 0x100000000 + word0;
147147
}
148148

149-
res = new Long(word0, word1, signed);
149+
res = new Long(word0, word1, !signed); // Long need unsigned
150150

151-
return bigNumberStrings ? res.toString() : res;
151+
return bigNumberStrings ? res.toString() : res.toNumber();
152152
}
153153

154154
console.trace();

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"dependencies": {
3131
"cardinal": "0.7.0",
3232
"double-ended-queue": "2.1.0-0",
33-
"long": "^3.1.0",
33+
"long": "^3.2.0",
3434
"named-placeholders": "1.1.1",
3535
"readable-stream": "2.1.4",
3636
"seq-queue": "0.0.5",

0 commit comments

Comments
 (0)