thomasfla / Linux-ESPNOW

An attempt at implementing a direct link between a linux station and an ESP module using ESPNOW protocol for real time robot control
BSD 2-Clause "Simplified" License
178 stars 28 forks source link

Fix computation of radiotap_len #4

Closed alexflint closed 1 year ago

alexflint commented 1 year ago

Under gcc, when you compute the radiotap length in get_radiotap_len, it seems that you need to cast the two bytes individually to int before left-shifting or the bytes will overflow and the result will be incorrect. This pr fixes that by adding two integer casts to get_radiotap_len.

thomasfla commented 1 year ago

Thanks