From 573fedeee1ab3c937b160b9eaa59637162edaa14 Mon Sep 17 00:00:00 2001 From: Gabriel Ferreira Date: Tue, 10 Jun 2025 19:13:54 +0200 Subject: [PATCH] wimax: (fixes #1140) Perform double multiplication before casting to uint32_t --- src/wimax/model/simple-ofdm-wimax-phy.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wimax/model/simple-ofdm-wimax-phy.cc b/src/wimax/model/simple-ofdm-wimax-phy.cc index 02176cdf2..d1e3fe13d 100644 --- a/src/wimax/model/simple-ofdm-wimax-phy.cc +++ b/src/wimax/model/simple-ofdm-wimax-phy.cc @@ -668,7 +668,7 @@ SimpleOfdmWimaxPhy::CalculateDataRate(WimaxPhy::ModulationType modulationType) c auto bitsTransmittedPerSymbol = (uint16_t)(bitsPerSymbol * GetNrCarriers() * fecCode); // 96, 192, 288, 384, 576, 767 and 864 bits per symbol for the seven modulations, respectively - return (uint32_t)symbolsPerSecond * bitsTransmittedPerSymbol; + return (uint32_t)(symbolsPerSecond * bitsTransmittedPerSymbol); } uint32_t