-
-
Notifications
You must be signed in to change notification settings - Fork 596
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
typo in packet.js #12
Comments
Do you want to create pull request? |
I just reviewed some parts of the code and seen the typo |
Well, thanks for that :) |
0xffffff is correct here, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Typo in lib/packets/packet.js:355
Packet.prototype.writeLengthCodedNumber = function(n) {
// TODO: null
if (n < 0xfb)
return this.writeInt8(n);
if (n < 0xffff) {
this.writeInt8(0xfc);
return this.writeInt16(n);
}
-------> if (this < 0xffffff) { /* should be n<0xfffffffff */
this.writeInt8(0xfd);
return this.writeInt24(n);
}
console.log(n);
console.trace();
throw "No bignumbers yet";
};
The text was updated successfully, but these errors were encountered: