BitMask::create Don't request more memory than needed when size is a multiply of 8
This commit is contained in:
parent
871d067aa9
commit
8963be2ef4
1 changed files with 1 additions and 1 deletions
|
@ -38,7 +38,7 @@ void BitMap::create(const Size2 &p_size) {
|
|||
|
||||
width = p_size.width;
|
||||
height = p_size.height;
|
||||
bitmask.resize(((width * height) / 8) + 1);
|
||||
bitmask.resize((((width * height) - 1) / 8) + 1);
|
||||
memset(bitmask.ptrw(), 0, bitmask.size());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue