Skip to content

Commit 83a4eb3

Browse files
committed
Fix issue reported by Coverity Scan
CID: 1391264 (Improper use of negative value) Signed-off-by: Noah Metzger <[email protected]>
1 parent 91c7504 commit 83a4eb3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ccmain/control.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -2027,7 +2027,7 @@ void Tesseract::set_word_fonts(WERD_RES *word) {
20272027
if (score1 > 0) {
20282028
const FontInfo fi = fontinfo_table_.get(font_id1);
20292029
if (tessedit_debug_fonts) {
2030-
if (word->fontinfo_id2_count > 0) {
2030+
if (word->fontinfo_id2_count > 0 && font_id2 >= 0) {
20312031
tprintf("Word modal font=%s, score=%d, 2nd choice %s/%d\n",
20322032
fi.name, word->fontinfo_id_count,
20332033
fontinfo_table_.get(font_id2).name,

0 commit comments

Comments
 (0)