mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-22 14:42:40 +01:00
json: fix json_tok_bitcoin_amount()
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
9a8eca4fee
commit
86e1a61165
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue