mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-12-27 13:36:00 +01:00
Fixed off-by-one error
This commit is contained in:
parent
fab51efea3
commit
7a4c105705
1 changed files with 2 additions and 2 deletions
|
@ -636,7 +636,7 @@ build_index(GtkTreeModel* model, GtkTreeIter* parent, PopplerIndexIter* index_it
|
||||||
void
|
void
|
||||||
draw(int page_id)
|
draw(int page_id)
|
||||||
{
|
{
|
||||||
if(!Zathura.PDF.document || page_id < 0 || page_id > Zathura.PDF.number_of_pages)
|
if(!Zathura.PDF.document || page_id < 0 || page_id >= Zathura.PDF.number_of_pages)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
double page_width, page_height;
|
double page_width, page_height;
|
||||||
|
@ -1210,7 +1210,7 @@ setCompletionRowColor(GtkBox* results, int mode, int id)
|
||||||
void
|
void
|
||||||
set_page(int page)
|
set_page(int page)
|
||||||
{
|
{
|
||||||
if(page > Zathura.PDF.number_of_pages || page < 0)
|
if(page >= Zathura.PDF.number_of_pages || page < 0)
|
||||||
{
|
{
|
||||||
notify(WARNING, "Could not open page");
|
notify(WARNING, "Could not open page");
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue