devtools/bolt12-cli: fix decoding of unknown fields.

We had known vs unknown backwards ("it's OK to be odd!")

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2024-07-18 11:03:55 +09:30
parent c342f204b2
commit 6d6716c9ec

View File

@ -399,7 +399,7 @@ static bool print_extra_fields(const struct tlv_field *fields)
for (size_t i = 0; i < tal_count(fields); i++) {
if (fields[i].meta)
continue;
if (fields[i].numtype % 2) {
if (fields[i].numtype % 2 == 0) {
printf("UNKNOWN EVEN field %"PRIu64": %s\n",
fields[i].numtype,
tal_hexstr(tmpctx, fields[i].value, fields[i].length));