Skip to content

Commit

Permalink
fix issue reading older style (page number-less) box files
Browse files Browse the repository at this point in the history
git-svn-id: https://tesseract-ocr.googlecode.com/svn/trunk@400 d0cd1f9f-072b-0410-8dd7-cf729c803f20
  • Loading branch information
joregan committed Jun 5, 2010
1 parent 150c1f7 commit 9b000b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ccutil/boxread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 9b000b1

Please sign in to comment.