Fix msg_opt_data
This commit is contained in:
parent
dc8851a553
commit
66d3a4431f
1 changed files with 3 additions and 0 deletions
3
nmrp.c
3
nmrp.c
|
@ -218,6 +218,9 @@ static void *msg_opt_data(struct nmrp_msg *msg, int type, uint16_t *len)
|
|||
|
||||
while (remaining > 0) {
|
||||
if (opt->type == type) {
|
||||
if (opt->len == NMRP_OPT_LEN) {
|
||||
return NULL;
|
||||
}
|
||||
*len = opt->len - NMRP_OPT_LEN;
|
||||
return (char*)&opt->val;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue