Fixed several issues found by static analysis

This commit is contained in:
Maksim Shabunin
2021-12-15 12:49:13 +03:00
committed by Maksim Shabunin
parent d8b1fc45aa
commit a079c2eb7c
5 changed files with 11 additions and 5 deletions

View File

@@ -881,6 +881,8 @@ void QRCodeEncoderImpl::findAutoMaskType()
total_modules += 1;
}
}
if (total_modules == 0)
continue; // TODO: refactor, extract functions to reduce complexity
int modules_percent = dark_modules * 100 / total_modules;
int lower_bound = 45;
int upper_bound = 55;