Skip to content

Commit 685b136

Browse files
authored
Fix incorrect condition.
1 parent 9e49539 commit 685b136

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/api/tesseractmain.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@ int main(int argc, char** argv) {
652652
osd_warning +=
653653
"\nWarning: The page segmentation mode 1 (Auto+OSD) is currently disabled. "
654654
"Using PSM 3 (Auto) instead.\n\n";
655-
} else if (tesseract::PSM_SPARSE_TEXT_OSD) {
655+
} else if (cur_psm == tesseract::PSM_SPARSE_TEXT_OSD) {
656656
api.SetPageSegMode(tesseract::PSM_SPARSE_TEXT);
657657
osd_warning +=
658658
"\nWarning: The page segmentation mode 12 (Sparse text + OSD) is currently disabled. "

0 commit comments

Comments
 (0)