From 9b000b1c4eb9f2af4d9ed72eb04ed54378cce62c Mon Sep 17 00:00:00 2001 From: joregan Date: Sat, 5 Jun 2010 15:33:28 +0000 Subject: [PATCH] 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 --- ccutil/boxread.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccutil/boxread.cpp b/ccutil/boxread.cpp index 87e499d2c..c1f9ae845 100644 --- a/ccutil/boxread.cpp +++ b/ccutil/boxread.cpp @@ -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);