mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 05:12:45 +01:00
common: fix MacOS compile error.
clang 10.0.0 (erroneously?) claims an enum_side cannot be >= NUM_SIDES. Make it clear that we're testing the raw u8 for validity. Fixes: #4409 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
d06e84cceb
commit
de52abbcde
@ -253,7 +253,7 @@ void fromwire_changed_htlc(const u8 **cursor, size_t *max,
|
||||
|
||||
enum side fromwire_side(const u8 **cursor, size_t *max)
|
||||
{
|
||||
enum side side = fromwire_u8(cursor, max);
|
||||
u8 side = fromwire_u8(cursor, max);
|
||||
if (side >= NUM_SIDES) {
|
||||
side = NUM_SIDES;
|
||||
fromwire_fail(cursor, max);
|
||||
|
Loading…
Reference in New Issue
Block a user