Fix clamping in commit fa64763b0d

This commit is contained in:
Vincent Sanders 2019-08-01 14:38:20 +01:00
parent acee5faa3f
commit 83c9d2017f
1 changed files with 2 additions and 1 deletions

View File

@ -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 = \