Browse Source

json: fix json_tok_bitcoin_amount()

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ppa-0.6.1
Rusty Russell 7 years ago
committed by Christian Decker
parent
commit
86e1a61165
  1. 2
      common/json.c

2
common/json.c

@ -100,7 +100,7 @@ bool json_tok_bitcoin_amount(const char *buffer, const jsmntok_t *tok,
return false;
if (end != buffer + tok->end) {
/* Expect always 8 decimal places. */
if (*end != '.' || buffer + tok->start - end != 9)
if (*end != '.' || buffer + tok->end - end != 9)
return false;
sat = strtoul(end+1, &end, 0);
if (sat == ULONG_MAX && errno == ERANGE)

Loading…
Cancel
Save