Skip to content
This repository has been archived by the owner on Mar 1, 2023. It is now read-only.

assertion failed when use mp_encode_int #21

Open
stdanley opened this issue Apr 14, 2021 · 2 comments
Open

assertion failed when use mp_encode_int #21

stdanley opened this issue Apr 14, 2021 · 2 comments

Comments

@stdanley
Copy link

hello, all
I have been using this libray, but failed at encode_int. when I looked into the code, I found:
"
MP_IMPL char *
mp_encode_int(char *data, int64_t num)
{
assert(num < 0);
if (num >= -0x20) {

"
what's the reason to force "num <0"

@rtsisyk
Copy link
Owner

rtsisyk commented Apr 14, 2021

Please use encode_uint for unsigned numbers.

@Totktonada
Copy link

The story is in #1.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants