qca / open-plc-utils

Qualcomm Atheros Open Powerline Toolkit.
Other
357 stars 159 forks source link

Function pev_cm_mnbc_sound setting wrong value for CNT field #164

Open vinicius-smartme opened 2 years ago

vinicius-smartme commented 2 years ago

The function pev_cm_mnbc_sound is setting the wrong indicate->MSVarField.CNT due post-decrement operator inside the while condition, what is causing the CNT field to be one below the expected value.

As a suggestion, just replace the while(sound--){} for do{ ...}while(sound--);