mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-11-10 23:24:24 +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
@ -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 New Issue
Block a user