msgpuck icon indicating copy to clipboard operation
msgpuck copied to clipboard

assertion failed when use mp_encode_int

Open stdanley opened this issue 3 years ago • 2 comments

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"

stdanley avatar Apr 14 '21 00:04 stdanley

Please use encode_uint for unsigned numbers.

rtsisyk avatar Apr 14 '21 05:04 rtsisyk

The story is in #1.

Totktonada avatar Sep 01 '21 11:09 Totktonada