Permalink
Browse files

cash_addr: fix hardcoded value of CHECKSUM_SIZE

  • Loading branch information...
prusnak committed Oct 25, 2018
1 parent 5c6b472 commit 2bbbc3e15573294c6dd0273d2a8542ba42507eb0
Showing with 1 addition and 1 deletion.
  1. +1 −1 cash_addr.c
@@ -132,7 +132,7 @@ int cash_decode(char* hrp, uint8_t *data, size_t *data_len, const char *input) {
return 0;
}
chk = cashaddr_polymod_step(chk) ^ v;
if (i + 6 < input_len) {
if (i + CHECKSUM_SIZE < input_len) {
data[i - (1 + hrp_len)] = v;
}
++i;

0 comments on commit 2bbbc3e

Please sign in to comment.