mirror of
https://github.com/deskflow/deskflow.git
synced 2026-07-01 21:02:39 +08:00
Add assert for code scan alert 550
This commit is contained in:
parent
63bc481b06
commit
472cb05f06
@ -30,6 +30,11 @@ ScreenSetupModel::ScreenSetupModel(
|
||||
m_Screens(screens),
|
||||
m_NumColumns(numColumns),
|
||||
m_NumRows(numRows) {
|
||||
|
||||
// bound rows and columns to prevent multiply overflow.
|
||||
// this is unlikely to happen, as the grid size is only 3x9.
|
||||
assert(m_NumColumns < 100 && m_NumRows < 100);
|
||||
|
||||
if (m_NumColumns * m_NumRows > screens.size())
|
||||
qFatal(
|
||||
"Not enough elements (%lld) in screens QList for %d columns and %d "
|
||||
|
||||
Loading…
Reference in New Issue
Block a user