mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-23 12:36:51 +03:00
Fix clamping in commit fa64763b0d
This commit is contained in:
parent
acee5faa3f
commit
83c9d2017f
@ -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 = \
|
||||
|
Loading…
Reference in New Issue
Block a user