mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 05:12:45 +01:00
tools/gen/impl_template: correct tlvs fromwire's for-loop
This commit is contained in:
parent
a3961c4e06
commit
5fb8e0aade
@ -269,9 +269,10 @@ bool fromwire_${tlv.name}(const u8 **cursor, size_t *max, struct ${tlv.struct_na
|
||||
* encoding for `type`.
|
||||
*/
|
||||
field.meta = NULL;
|
||||
for (size_t i = 0; i < num_types; i++)
|
||||
for (size_t i = 0; i < num_types; i++) {
|
||||
if (types[i].type == field.numtype)
|
||||
field.meta = &types[i];
|
||||
}
|
||||
|
||||
if (field.meta) {
|
||||
/* Length of message can't exceed 16 bits anyway. */
|
||||
|
Loading…
Reference in New Issue
Block a user