(3.4) Fixed several issues found by static analysis

original commit: a079c2eb7c
This commit is contained in:
Maksim Shabunin
2021-12-15 12:49:13 +03:00
committed by Alexander Alekhin
parent 6a889ed3e5
commit 792b7e0629
2 changed files with 5 additions and 1 deletions
+2
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;