mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-12-04 09:49:16 +08:00
Fix issue reported by Coverity Scan
CID: 1391264 (Improper use of negative value) Signed-off-by: Noah Metzger <noah.metzger@bib.uni-mannheim.de>
This commit is contained in:
parent
91c7504a35
commit
83a4eb3b44
@ -2027,7 +2027,7 @@ void Tesseract::set_word_fonts(WERD_RES *word) {
|
||||
if (score1 > 0) {
|
||||
const FontInfo fi = fontinfo_table_.get(font_id1);
|
||||
if (tessedit_debug_fonts) {
|
||||
if (word->fontinfo_id2_count > 0) {
|
||||
if (word->fontinfo_id2_count > 0 && font_id2 >= 0) {
|
||||
tprintf("Word modal font=%s, score=%d, 2nd choice %s/%d\n",
|
||||
fi.name, word->fontinfo_id_count,
|
||||
fontinfo_table_.get(font_id2).name,
|
||||
|
Loading…
Reference in New Issue
Block a user