mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-12-11 23:19:04 +08:00
Fix issue detected by Coverity Scan
CID: 1340285 (Division or modulo by zero) Signed-off-by: Noah Metzger <noah.metzger@bib.uni-mannheim.de>
This commit is contained in:
parent
d28631a274
commit
65997bed16
@ -926,7 +926,8 @@ void ColumnFinder::ComputeMeanColumnGap(bool any_multi_column) {
|
||||
&gap_samples);
|
||||
}
|
||||
mean_column_gap_ = any_multi_column && gap_samples > 0
|
||||
? total_gap / gap_samples : total_width / width_samples;
|
||||
? total_gap / gap_samples : width_samples > 0
|
||||
? total_width / width_samples : 0;
|
||||
}
|
||||
|
||||
//////// Functions that manipulate ColPartitions in the part_grid_ /////
|
||||
|
Loading…
Reference in New Issue
Block a user