mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-12-28 05:56:01 +01:00
Bound returned page by number of pages - 1
Closes: #404 Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
This commit is contained in:
parent
aaa5467305
commit
3d96d44095
1 changed files with 1 additions and 1 deletions
|
@ -81,7 +81,7 @@ position_to_page_number(zathura_document_t* document, double pos_x,
|
|||
if (page < c0 - 1) {
|
||||
return 0;
|
||||
} else {
|
||||
return page - (c0 - 1);
|
||||
return MIN(page - (c0 - 1), npag - 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue