[components][drivers][wlan] 修复WLAN事件附加数据为空的问题

This commit is contained in:
tangyuxin 2019-09-06 15:28:46 +08:00
parent 42248d81e5
commit 8a3e66bc27
1 changed files with 2 additions and 1 deletions

View File

@ -260,7 +260,8 @@ static rt_err_t rt_wlan_send_to_thread(rt_wlan_event_t event, void *buff, int le
msg->event = event; msg->event = event;
if (len != 0) if (len != 0)
{ {
msg->buff = ((char *)msg) + sizeof(struct rt_wlan_msg); msg->buff = (void *)&msg[1];
rt_memcpy(msg->buff, buff, len);
msg->len = len; msg->len = len;
} }