mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
tools/gen/impl_template: correct tlvs fromwire's for-loop
This commit is contained in:
committed by
Christian Decker
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`.
|
* encoding for `type`.
|
||||||
*/
|
*/
|
||||||
field.meta = NULL;
|
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)
|
if (types[i].type == field.numtype)
|
||||||
field.meta = &types[i];
|
field.meta = &types[i];
|
||||||
|
}
|
||||||
|
|
||||||
if (field.meta) {
|
if (field.meta) {
|
||||||
/* Length of message can't exceed 16 bits anyway. */
|
/* Length of message can't exceed 16 bits anyway. */
|
||||||
|
|||||||
Reference in New Issue
Block a user