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:
joregan 2010-06-05 15:33:28 +00:00
parent 150c1f741c
commit 9b000b1c4e

View File

@ -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);