From 771e0513bb7b9e01ef4c5216b122140d99d4cf99 Mon Sep 17 00:00:00 2001 From: Sebastian Ramacher Date: Thu, 25 Feb 2016 00:06:26 +0100 Subject: [PATCH] Compare with fabs Signed-off-by: Sebastian Ramacher --- zathura/jumplist.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zathura/jumplist.c b/zathura/jumplist.c index 5fd783f..f7e3c57 100644 --- a/zathura/jumplist.c +++ b/zathura/jumplist.c @@ -5,6 +5,7 @@ #include "database.h" #include +#include static void zathura_jumplist_reset_current(zathura_t* zathura); static void zathura_jumplist_append_jump(zathura_t* zathura); @@ -120,7 +121,7 @@ zathura_jumplist_add(zathura_t* zathura) zathura_jump_t* cur = zathura_jumplist_current(zathura); if (cur != NULL) { - if (cur->page == pagenum && cur->x == x && cur->y == y) { + if (cur->page == pagenum && fabs(cur->x - x) <= DBL_EPSILON && fabs(cur->y - y) <= DBL_EPSILON) { return; } }