fix: Division by zero when setting page size to 0

This commit is contained in:
WerWolv 2023-11-08 11:14:56 +01:00
parent 1ca71ec30d
commit e18275c1c0
1 changed files with 2 additions and 0 deletions

View File

@ -185,6 +185,8 @@ namespace hex::prv {
void Provider::setPageSize(size_t pageSize) {
if (pageSize > MaxPageSize)
pageSize = MaxPageSize;
if (pageSize == 0)
return;
this->m_pageSize = pageSize;
}