Skip to content

Conversation

@szandras2524
Copy link

Hey,

I found this small issue, while the converter was not correct.

Now, it's working perfectly for me.

Header.prototype.convertBinaryToInteger = function (buffer) {
if (buffer.length == 1) return buffer.readUInt8(0);
if (buffer.length == 2) return buffer.readUInt16LE(0);
if (buffer.length == 4) return buffer.readUInt32LE(0);
return 0;
};

Thanks for your great code!

András

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants