Skip to content
Snippets Groups Projects
Commit 999a4bc4 authored by Aleksandr Lysikov's avatar Aleksandr Lysikov Committed by Kurotych Anatolii
Browse files

fixed incorrect output size for encode() if there are leading zeros in (#43)

parent 8f818b84
No related branches found
No related tags found
No related merge requests found
......@@ -186,8 +186,8 @@ size_t dap_enc_base58_encode(const void * a_in, size_t a_in_size, char * a_out)
memset(a_out, '1', zcount);
for (i = zcount; j < (ssize_t)size; ++i, ++j)
a_out[i] = c_b58digits_ordered[buf[j]];
a_out[i+zcount] = '\0';
l_out_size = i + 1;
a_out[i] = '\0';
l_out_size = i;
return l_out_size;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment