common: fix arm32 compile breakage.

It's obviously the incorrect type, while our CI didn't catch it, Nicholas did:

```
plugins/fetchinvoice.c:1362:30: error: conversion from 'long long unsigned int' to 'size_t' {aka 'unsigned int'} changes value from '18446744073709551615' to '4294967295' [-Werror=overflow]
 1362 |      || tlv_span(wire, 1001, UINT64_MAX, NULL) != 0) {
```

Reported-by: @NicholasDorier
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Changelog-Fixed: Build: arm32 compiler error in fetchinvoice, due to bad types on 32-bit platforms.
Fixes: #5776
This commit is contained in:
Rusty Russell 2022-12-06 10:20:26 +10:30 committed by Christian Decker
parent 1d4f7f023d
commit 37590eeeb2
2 changed files with 2 additions and 2 deletions

View file

@ -432,7 +432,7 @@ bool bolt12_has_prefix(const char *str)
}
/* Inclusive span of tlv range >= minfield and <= maxfield */
size_t tlv_span(const u8 *tlvstream, size_t minfield, size_t maxfield,
size_t tlv_span(const u8 *tlvstream, u64 minfield, u64 maxfield,
size_t *startp)
{
const u8 *cursor = tlvstream;

View file

@ -135,7 +135,7 @@ bool bolt12_has_prefix(const char *str);
*
* Returns length, so 0 means nothing found.
*/
size_t tlv_span(const u8 *tlvstream, size_t minfield, size_t maxfield,
size_t tlv_span(const u8 *tlvstream, u64 minfield, u64 maxfield,
size_t *start);
/* Get offer_id referred to by various structures. */