Skip to content

Commit

Permalink
Fix page range in log message
Browse files Browse the repository at this point in the history
The internal range is 0...(n-1), but for users a page range 1...n is
more natural. Showing a range 0...n is wrong because it would imply
n+1 pages.

Change printed text from

    Loaded 72/72 pages (0-72) of document ...

to

    Loaded 72/72 pages (1-72) of document ...

Signed-off-by: Stefan Weil <sw@weilnetz.de>
  • Loading branch information
stweil committed Dec 15, 2016
1 parent ead87a7 commit 23a7330
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ccstruct/imagedata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -552,7 +552,7 @@ bool DocumentData::ReCachePages() {
pages_.truncate(0);
} else {
tprintf("Loaded %d/%d pages (%d-%d) of document %s\n", pages_.size(),
loaded_pages, pages_offset_, pages_offset_ + pages_.size(),
loaded_pages, pages_offset_ + 1, pages_offset_ + pages_.size(),
document_name_.string());
}
set_total_pages(loaded_pages);
Expand Down

0 comments on commit 23a7330

Please sign in to comment.