Skip to content

Commit 37590ee

Browse files
rustyrussellcdecker
authored andcommitted
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 <[email protected]> Changelog-Fixed: Build: arm32 compiler error in fetchinvoice, due to bad types on 32-bit platforms. Fixes: #5776
1 parent 1d4f7f0 commit 37590ee

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

common/bolt12.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ bool bolt12_has_prefix(const char *str)
432432
}
433433

434434
/* Inclusive span of tlv range >= minfield and <= maxfield */
435-
size_t tlv_span(const u8 *tlvstream, size_t minfield, size_t maxfield,
435+
size_t tlv_span(const u8 *tlvstream, u64 minfield, u64 maxfield,
436436
size_t *startp)
437437
{
438438
const u8 *cursor = tlvstream;

common/bolt12.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ bool bolt12_has_prefix(const char *str);
135135
*
136136
* Returns length, so 0 means nothing found.
137137
*/
138-
size_t tlv_span(const u8 *tlvstream, size_t minfield, size_t maxfield,
138+
size_t tlv_span(const u8 *tlvstream, u64 minfield, u64 maxfield,
139139
size_t *start);
140140

141141
/* Get offer_id referred to by various structures. */

0 commit comments

Comments
 (0)