diff --git a/src/monero_api.h b/src/monero_api.h index e2584c4..195cac4 100644 --- a/src/monero_api.h +++ b/src/monero_api.h @@ -113,7 +113,7 @@ int monero_vamount2str(unsigned char *binary, char *str, unsigned int str_len); /** binary little endian unsigned int amount to str */ int monero_bamount2str(unsigned char *binary, char *str, size_t binary_len, unsigned int str_len); /** uint64 amount to str */ -int monero_amount2str(uint64_t xmr, char *str, unsigned int str_len); +unsigned int monero_amount2str(uint64_t xmr, char *str, unsigned int str_len); /** uint64 amount to str */ unsigned int monero_uint642str(uint64_t val, char *str, unsigned int str_len); diff --git a/src/monero_crypto.c b/src/monero_crypto.c index ee41a97..05155fc 100644 --- a/src/monero_crypto.c +++ b/src/monero_crypto.c @@ -1284,7 +1284,6 @@ int monero_rng_mod_order(unsigned char *r, size_t r_len) { /* ----------------------------------------------------------------------- */ /* --- --- */ /* ----------------------------------------------------------------------- */ -/* return 0 if ok, 1 if missing decimal */ unsigned int monero_uint642str(uint64_t val, char *str, unsigned int str_len) { char stramount[22]; unsigned int offset, len; @@ -1312,8 +1311,7 @@ unsigned int monero_uint642str(uint64_t val, char *str, unsigned int str_len) { /* ----------------------------------------------------------------------- */ /* --- --- */ /* ----------------------------------------------------------------------- */ -/* return 0 if ok, 1 if missing decimal */ -int monero_amount2str(uint64_t xmr, char *str, unsigned int str_len) { +unsigned int monero_amount2str(uint64_t xmr, char *str, unsigned int str_len) { // max uint64 is 18446744073709551616, aka 20 char, plus dot char stramount[22]; unsigned int offset, len;