diff options
author | Vincent Sanders <vince@kyllikki.org> | 2019-08-01 14:38:20 +0100 |
---|---|---|
committer | Vincent Sanders <vince@kyllikki.org> | 2019-08-01 14:38:20 +0100 |
commit | 83c9d2017f16be6ef42a590e1eff76006a897d67 (patch) | |
tree | e11244f7b7df324d916ca888056eec72c68ed7d1 /desktop/browser_history.c | |
parent | acee5faa3f03a229a6d7d14e042441a6af048faf (diff) | |
download | netsurf-83c9d2017f16be6ef42a590e1eff76006a897d67.tar.gz netsurf-83c9d2017f16be6ef42a590e1eff76006a897d67.tar.bz2 |
Fix clamping in commit fa64763b0d8c6566eda5f6547e7f2f3e62b77613
Diffstat (limited to 'desktop/browser_history.c')
-rw-r--r-- | desktop/browser_history.c | 3 |
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 = \ |