summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2019-08-01 14:38:20 +0100
committerVincent Sanders <vince@kyllikki.org>2019-08-01 14:38:20 +0100
commit83c9d2017f16be6ef42a590e1eff76006a897d67 (patch)
treee11244f7b7df324d916ca888056eec72c68ed7d1
parentacee5faa3f03a229a6d7d14e042441a6af048faf (diff)
downloadnetsurf-83c9d2017f16be6ef42a590e1eff76006a897d67.tar.gz
netsurf-83c9d2017f16be6ef42a590e1eff76006a897d67.tar.bz2
Fix clamping in commit fa64763b0d8c6566eda5f6547e7f2f3e62b77613
-rw-r--r--desktop/browser_history.c3
1 files changed, 2 insertions, 1 deletions
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 = \