mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2025-01-18 06:30:14 +08:00
fix issue reading older style (page number-less) box files
git-svn-id: https://tesseract-ocr.googlecode.com/svn/trunk@400 d0cd1f9f-072b-0410-8dd7-cf729c803f20
This commit is contained in:
parent
150c1f741c
commit
9b000b1c4e
@ -101,7 +101,7 @@ bool read_next_box(int target_page, FILE* box_file, char* utf8_str,
|
||||
count = 0;
|
||||
}
|
||||
}
|
||||
if (count < 5) {
|
||||
if ((count < 5 && target_page > 0) || (count < 4 && target_page <= 0)) {
|
||||
tprintf("Box file format error on line %i ignored\n", line);
|
||||
} else {
|
||||
strcpy(utf8_str, uch);
|
||||
|
Loading…
Reference in New Issue
Block a user