multi_page::remove_page - account for index when limiting number of pages to remove

This commit is contained in:
white-haired-uncle 2024-10-21 16:54:10 -04:00 committed by Charles Dang
parent a34e4a345a
commit e6d5100924

View file

@ -80,8 +80,8 @@ void multi_page::remove_page(const unsigned page, unsigned count)
return;
}
if(!count || count > get_page_count()) {
count = get_page_count();
if(!count || (page + count) > get_page_count()) {
count = get_page_count() - page;
}
for(; count; --count) {