bolt11: comment on weird assignment-then-check test.

Suggested-by: Christian Decker
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2017-11-01 10:10:09 +10:30
parent 8f17effeeb
commit b7774fcb0a

View file

@ -269,6 +269,7 @@ static char *decode_c(struct bolt11 *b11,
return tal_fmt(b11, "c: length %zu chars is excessive",
*data_len);
b11->min_final_cltv_expiry = c;
/* Can overflow, since c is 64 bits but value must be < 32 bits */
if (b11->min_final_cltv_expiry != c)
return tal_fmt(b11, "c: %"PRIu64" is too large", c);