Closed pragunvohra closed 1 year ago
Hi @pragunvohra, and thanks! BigInt is only supported for writing and reading 64 bit integers. Adding support for BigInt to be used as memory addresses is on my TODO list now, so I will keep the issue open until then, thanks for raising it :)
Thanks @pragunvohra I temporarily implemented your fix for BigInt addresses (handy to read pointers) locally. Can't wait till Rob has officially worked this into the project :)
Added support for this in f6a0861
Hi Rob,
Fantastic library, thanks for making this!
I'm not sure if I am doing something wrong here, but it looks to me as though although the library is perfectly capable of reading uint64/bigints, it does not seem to accept them as an address for reading.
E.g. calling memoryjs.readMemory(handle, BigInt(0x0), memoryjs.BYTE) seems to throw an error.
Changing the below in memoryjs.cc ~ line 330 seems to fix it (and updating the corresponding call in memoryjs readMemory's method):
to
and in memoryjs's index.js changing readMemory to wrap the value like so:
Granted, there are other places that would also need such changes done.
Thank you!