From 1df1581f27688f04f9d998e8a2430f4c270be43d Mon Sep 17 00:00:00 2001 From: Sebastian Ramacher Date: Sat, 3 Dec 2022 20:57:10 +0100 Subject: [PATCH] Account for double errors --- zathura/zathura.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zathura/zathura.c b/zathura/zathura.c index f78756b..e3403ae 100644 --- a/zathura/zathura.c +++ b/zathura/zathura.c @@ -996,7 +996,7 @@ document_open_page_most_frequent_size(zathura_document_t *document, bool found = false; GIRARA_LIST_FOREACH_BODY(samples, sample_t*, sample, - if (sample->h == h && sample->w == w) { + if (fabs(sample->h - h) <= DBL_EPSILON && fabs(sample->w - w) <= DBL_EPSILON) { sample->freq++; found = true; break;