From 83c9d2017f16be6ef42a590e1eff76006a897d67 Mon Sep 17 00:00:00 2001 From: Vincent Sanders Date: Thu, 1 Aug 2019 14:38:20 +0100 Subject: [PATCH] Fix clamping in commit fa64763b0d8c6566eda5f6547e7f2f3e62b77613 --- desktop/browser_history.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/desktop/browser_history.c b/desktop/browser_history.c index ad9c50115..2a5fd63ba 100644 --- a/desktop/browser_history.c +++ b/desktop/browser_history.c @@ -458,11 +458,12 @@ nserror browser_window_history_update(struct browser_window *bw, guit->window->get_scroll(bw->window, &sx, &sy)) { int content_height = content_get_height(content); int content_width = content_get_width(content); + /* clamp width and height values */ if (content_height < 1) { content_height = 1; } if (content_width < 1) { - content_height = 1; + content_width = 1; } /* Successfully got scroll offsets, update the entry */ history->current->page.scroll_x = \