Skip to content

Commit

Permalink
fix lock value
Browse files Browse the repository at this point in the history
  • Loading branch information
Consti10 committed Oct 10, 2023
1 parent 0ac3467 commit bbaef56
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/radiotap/RadiotapHeaderRx.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@ static std::optional<ParsedRxRadiotapPacket> process_received_radiotap_packet(co
tmp_copy_IEEE80211_RADIOTAP_FLAGS = *(uint8_t *) (iterator.this_arg);
break;
case IEEE80211_RADIOTAP_LOCK_QUALITY:{
uint16_t value;
uint16_t value=0;
// NOTE: Here we only copy 8 bits - the value is reported in radiotap as uint16_t type,
// but only in the 0..100 range, so uint8_t would be sufficient (and works)
std::memcpy(&value,iterator.this_arg,1);
radiotap_lock_quality.push_back(value);
} break ;
Expand Down

0 comments on commit bbaef56

Please sign in to comment.