If field isn't expected length (in *bech32*!), call unknown_field. * Otherwise copy into dst without padding, set have_flag if non-NULL. */
| 150 | /* If field isn't expected length (in *bech32*!), call unknown_field. |
| 151 | * Otherwise copy into dst without padding, set have_flag if non-NULL. */ |
| 152 | static const char *pull_expected_length(struct bolt11 *b11, |
| 153 | struct hash_u5 *hu5, |
| 154 | const u5 **data, size_t *field_len, |
| 155 | size_t expected_length, |
| 156 | u5 type, |
| 157 | bool *have_flag, |
| 158 | void *dst) |
| 159 | { |
| 160 | if (*field_len != expected_length) |
| 161 | return unknown_field(b11, hu5, data, field_len, type); |
| 162 | |
| 163 | if (have_flag) |
| 164 | *have_flag = true; |
| 165 | return pull_bits(hu5, data, field_len, dst, *field_len * 5, false); |
| 166 | } |
| 167 | |
| 168 | /* BOLT #11: |
| 169 | * |