Skip to content

Conversation

@hughrawlinson
Copy link
Contributor

Node's buffer.readIntLE is documented as having two required arguments, offset and bytelength. This file calls the method several times with no arguments. This was causing issues for me on mac, node v12.4.0. I modified these two calls to pass those arguments, which I found through trial and error. I don't understand what they do. That was enough to get my specific program running. This PR is not a fix - it's an explanation of what I think might be causing issue #16. Hopefully it's useful for you or someone in finding and fixing the issue.

Thanks for an awesome library, I have been having great fun crashing lots of spacecraft.

@lucaelin
Copy link

I fixed this by letting the protobufjs library handle decoding of primitive values. Maybe krpc-node could profit from this as well?
https://github.com/lucaelin/krpc.js/blob/3bbe49125dfbe6409fb98bf7fe3757873a38f39e/lib/decoders.js#L67

@eXigentCoder
Copy link
Owner

My apologies, I got married and was on honeymoon so have been off the radar for a bit!
Merging this PR for now and will look at moving the implementation across to your suggestion @lucaelin that seems a lot cleaner, thanks!

@eXigentCoder eXigentCoder merged commit b7d39db into eXigentCoder:master Sep 30, 2019
@hughrawlinson hughrawlinson deleted the patch-1 branch October 8, 2019 17:28
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.

3 participants