mirror of https://github.com/WerWolv/ImHex.git
fix: Division by zero when setting page size to 0
This commit is contained in:
parent
1ca71ec30d
commit
e18275c1c0
|
@ -185,6 +185,8 @@ namespace hex::prv {
|
||||||
void Provider::setPageSize(size_t pageSize) {
|
void Provider::setPageSize(size_t pageSize) {
|
||||||
if (pageSize > MaxPageSize)
|
if (pageSize > MaxPageSize)
|
||||||
pageSize = MaxPageSize;
|
pageSize = MaxPageSize;
|
||||||
|
if (pageSize == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
this->m_pageSize = pageSize;
|
this->m_pageSize = pageSize;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue