diff --git a/include/dot11.h b/include/dot11.h index f1dabce..790d2f8 100644 --- a/include/dot11.h +++ b/include/dot11.h @@ -2689,7 +2689,9 @@ namespace Tins { uint32_t write_ext_header(uint8_t *buffer, uint32_t total_sz); - uint32_t data_frame_size() { return sizeof(_ext_header) + (from_ds() && to_ds()) ? sizeof(_addr4) : 0; } + uint32_t data_frame_size() { + return sizeof(_ext_header) + ((from_ds() && to_ds()) ? sizeof(_addr4) : 0); + } private: ExtendedHeader _ext_header; address_type _addr4;